diff options
23 files changed, 67 insertions, 97 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 2a96a9b..ef0b814 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -866,7 +866,6 @@ def _CheckSpamLogging(input_api, output_api): _TEST_CODE_EXCLUDED_PATHS + input_api.DEFAULT_BLACK_LIST + (r"^base[\\\/]logging\.h$", - r"^chrome[\\\/]app[\\\/]chrome_main_delegate\.cc$", r"^chrome[\\\/]browser[\\\/]chrome_browser_main\.cc$", r"^chrome[\\\/]installer[\\\/]setup[\\\/].*", r"^chrome[\\\/]renderer[\\\/]extensions[\\\/]" diff --git a/chrome/app/chrome_breakpad_client.cc b/chrome/app/chrome_breakpad_client.cc index 84a6977..36b50f9 100644 --- a/chrome/app/chrome_breakpad_client.cc +++ b/chrome/app/chrome_breakpad_client.cc @@ -380,13 +380,4 @@ int ChromeBreakpadClient::GetAndroidMinidumpDescriptor() { } #endif -bool ChromeBreakpadClient::EnableBreakpadForProcess( - const std::string& process_type) { - return process_type == switches::kRendererProcess || - process_type == switches::kPluginProcess || - process_type == switches::kPpapiPluginProcess || - process_type == switches::kZygoteProcess || - process_type == switches::kGpuProcess; -} - } // namespace chrome diff --git a/chrome/app/chrome_breakpad_client.h b/chrome/app/chrome_breakpad_client.h index 7e79a09..10d0980 100644 --- a/chrome/app/chrome_breakpad_client.h +++ b/chrome/app/chrome_breakpad_client.h @@ -68,9 +68,6 @@ class ChromeBreakpadClient : public breakpad::BreakpadClient { virtual void InstallAdditionalFilters(BreakpadRef breakpad) OVERRIDE; #endif - virtual bool EnableBreakpadForProcess( - const std::string& process_type) OVERRIDE; - private: DISALLOW_COPY_AND_ASSIGN(ChromeBreakpadClient); }; diff --git a/chrome/app/chrome_exe_main_win.cc b/chrome/app/chrome_exe_main_win.cc index 68a2519..591ec7a 100644 --- a/chrome/app/chrome_exe_main_win.cc +++ b/chrome/app/chrome_exe_main_win.cc @@ -47,15 +47,9 @@ int RunChrome(HINSTANCE instance) { bool exit_now = true; // We restarted because of a previous crash. Ask user if we should relaunch. - // Only show this for the browser process. See crbug.com/132119. - const std::string process_type = - CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kProcessType); - if (process_type.empty()) { - if (breakpad::ShowRestartDialogIfCrashed(&exit_now)) { - if (exit_now) - return content::RESULT_CODE_NORMAL_EXIT; - } + if (breakpad::ShowRestartDialogIfCrashed(&exit_now)) { + if (exit_now) + return content::RESULT_CODE_NORMAL_EXIT; } // Initialize the sandbox services. diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index f75032e..c655619 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -478,7 +478,7 @@ void ChromeMainDelegate::InitMacCrashReporter(const CommandLine& command_line, // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, // Breakpad initialization could occur sooner, preferably even before the // framework dylib is even loaded, to catch potential early crashes. - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); #if defined(NDEBUG) bool is_debug_build = false; @@ -555,7 +555,7 @@ void ChromeMainDelegate::InitMacCrashReporter(const CommandLine& command_line, } if (breakpad::IsCrashReporterEnabled()) - breakpad::InitCrashProcessInfo(process_type); + breakpad::InitCrashProcessInfo(); } #endif // defined(OS_MACOSX) @@ -708,11 +708,11 @@ void ChromeMainDelegate::PreSandboxStartup() { if (process_type != switches::kZygoteProcess) { #if defined(OS_ANDROID) if (process_type.empty()) - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); else - breakpad::InitNonBrowserCrashReporterForAndroid(process_type); + breakpad::InitNonBrowserCrashReporterForAndroid(); #else // !defined(OS_ANDROID) - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); #endif // defined(OS_ANDROID) } #endif // defined(OS_POSIX) && !defined(OS_MACOSX) @@ -818,13 +818,10 @@ void ChromeMainDelegate::ZygoteForked() { // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // this up for the browser process in a different manner. - const CommandLine* command_line = CommandLine::ForCurrentProcess(); - std::string process_type = - command_line->GetSwitchValueASCII(switches::kProcessType); - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); // Reset the command line for the newly spawned process. - crash_keys::SetSwitchesFromCommandLine(command_line); + crash_keys::SetSwitchesFromCommandLine(CommandLine::ForCurrentProcess()); } #endif // OS_MACOSX diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc index 0258371..e3d495e 100644 --- a/chrome/app/client_util.cc +++ b/chrome/app/client_util.cc @@ -286,10 +286,7 @@ int MainDllLoader::Launch(HINSTANCE instance, // widely deployed. env->UnSetVar(env_vars::kGoogleUpdateIsMachineEnvVar); - const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); - std::string process_type = - cmd_line.GetSwitchValueASCII(switches::kProcessType); - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); OnBeforeLaunch(file); DLL_MAIN entry_point = diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index 77a17a5..ac460ca 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc @@ -480,7 +480,7 @@ void WizardController::OnEulaAccepted() { #if defined(GOOGLE_CHROME_BUILD) // The crash reporter initialization needs IO to complete. base::ThreadRestrictions::ScopedAllowIO allow_io; - breakpad::InitCrashReporter(std::string()); + breakpad::InitCrashReporter(); #endif } diff --git a/chrome/browser/ui/cocoa/first_run_dialog.mm b/chrome/browser/ui/cocoa/first_run_dialog.mm index 9e1fd32..4117e62 100644 --- a/chrome/browser/ui/cocoa/first_run_dialog.mm +++ b/chrome/browser/ui/cocoa/first_run_dialog.mm @@ -106,8 +106,8 @@ bool ShowFirstRun(Profile* profile) { // on the first run it may not have been enabled due to the missing opt-in // from the user. If the user agreed now, enable breakpad if necessary. if (!breakpad::IsCrashReporterEnabled() && stats_enabled) { - breakpad::InitCrashReporter(std::string()); - breakpad::InitCrashProcessInfo(std::string()); + breakpad::InitCrashReporter(); + breakpad::InitCrashProcessInfo(); } // If selected set as default browser. diff --git a/chrome/browser/ui/gtk/first_run_dialog.cc b/chrome/browser/ui/gtk/first_run_dialog.cc index f002127..25505b5 100644 --- a/chrome/browser/ui/gtk/first_run_dialog.cc +++ b/chrome/browser/ui/gtk/first_run_dialog.cc @@ -135,7 +135,7 @@ void FirstRunDialog::OnResponseDialog(GtkWidget* widget, int response) { if (report_crashes_ && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(report_crashes_))) { if (GoogleUpdateSettings::SetCollectStatsConsent(true)) - breakpad::InitCrashReporter(std::string()); + breakpad::InitCrashReporter(); } else { GoogleUpdateSettings::SetCollectStatsConsent(false); } diff --git a/chrome/nacl/nacl_exe_win_64.cc b/chrome/nacl/nacl_exe_win_64.cc index 72be26a..0b534b4 100644 --- a/chrome/nacl/nacl_exe_win_64.cc +++ b/chrome/nacl/nacl_exe_win_64.cc @@ -21,7 +21,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { CommandLine::Init(0, NULL); breakpad::SetBreakpadClient(g_chrome_breakpad_client.Pointer()); - breakpad::InitCrashReporter(std::string()); + breakpad::InitCrashReporter(); return nacl::NaClWin64Main(); } diff --git a/components/breakpad/app/DEPS b/components/breakpad/app/DEPS index 1a1417f..1ee965e 100644 --- a/components/breakpad/app/DEPS +++ b/components/breakpad/app/DEPS @@ -3,6 +3,7 @@ include_rules = [ "-content/public/common", "+content/public/common/content_descriptors.h", + "+content/public/common/content_switches.h", "+content/public/common/result_codes.h", "+third_party/lss/linux_syscall_support.h", ] diff --git a/components/breakpad/app/breakpad_client.cc b/components/breakpad/app/breakpad_client.cc index e9bbe87..c39d8f9 100644 --- a/components/breakpad/app/breakpad_client.cc +++ b/components/breakpad/app/breakpad_client.cc @@ -124,8 +124,4 @@ void BreakpadClient::InstallAdditionalFilters(BreakpadRef breakpad) { } #endif -bool BreakpadClient::EnableBreakpadForProcess(const std::string& process_type) { - return false; -} - } // namespace breakpad diff --git a/components/breakpad/app/breakpad_client.h b/components/breakpad/app/breakpad_client.h index 09a5047..a92c0fb 100644 --- a/components/breakpad/app/breakpad_client.h +++ b/components/breakpad/app/breakpad_client.h @@ -137,9 +137,6 @@ class BreakpadClient { // Install additional breakpad filter callbacks. virtual void InstallAdditionalFilters(BreakpadRef breakpad); #endif - - // Returns true if breakpad should run in the given process type. - virtual bool EnableBreakpadForProcess(const std::string& process_type); }; } // namespace breakpad diff --git a/components/breakpad/app/breakpad_linux.cc b/components/breakpad/app/breakpad_linux.cc index cc220f1..9106568 100644 --- a/components/breakpad/app/breakpad_linux.cc +++ b/components/breakpad/app/breakpad_linux.cc @@ -40,6 +40,7 @@ #include "components/breakpad/app/breakpad_client.h" #include "components/breakpad/app/breakpad_linux_impl.h" #include "content/public/common/content_descriptors.h" +#include "content/public/common/content_switches.h" #if defined(OS_ANDROID) #include <android/log.h> @@ -704,8 +705,7 @@ bool CrashDoneInProcessNoUpload( return FinalizeCrashDoneAndroid(); } -void EnableNonBrowserCrashDumping(const std::string& process_type, - int minidump_fd) { +void EnableNonBrowserCrashDumping(int minidump_fd) { // This will guarantee that the BuildInfo has been initialized and subsequent // calls will not require memory allocation. base::android::BuildInfo::GetInstance(); @@ -729,6 +729,9 @@ void EnableNonBrowserCrashDumping(const std::string& process_type, g_is_crash_reporter_enabled = true; // Save the process type (it is leaked). + const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); + const std::string process_type = + parsed_command_line.GetSwitchValueASCII(switches::kProcessType); const size_t process_type_len = process_type.size() + 1; g_process_type = new char[process_type_len]; strncpy(g_process_type, process_type.c_str(), process_type_len); @@ -1438,7 +1441,7 @@ void HandleCrashDump(const BreakpadInfo& info) { (void) HANDLE_EINTR(sys_waitpid(child, NULL, 0)); } -void InitCrashReporter(const std::string& process_type) { +void InitCrashReporter() { #if defined(OS_ANDROID) // This will guarantee that the BuildInfo has been initialized and subsequent // calls will not require memory allocation. @@ -1449,6 +1452,8 @@ void InitCrashReporter(const std::string& process_type) { if (parsed_command_line.HasSwitch(switches::kDisableBreakpad)) return; + const std::string process_type = + parsed_command_line.GetSwitchValueASCII(switches::kProcessType); if (process_type.empty()) { bool enable_breakpad = GetBreakpadClient()->GetCollectStatsConsent() || GetBreakpadClient()->IsRunningUnattended(); @@ -1464,7 +1469,11 @@ void InitCrashReporter(const std::string& process_type) { } EnableCrashDumping(GetBreakpadClient()->IsRunningUnattended()); - } else if (GetBreakpadClient()->EnableBreakpadForProcess(process_type)) { + } else if (process_type == switches::kRendererProcess || + process_type == switches::kPluginProcess || + process_type == switches::kPpapiPluginProcess || + process_type == switches::kZygoteProcess || + process_type == switches::kGpuProcess) { #if defined(OS_ANDROID) NOTREACHED() << "Breakpad initialized with InitCrashReporter() instead of " "InitNonBrowserCrashReporter in " << process_type << " process."; @@ -1499,7 +1508,7 @@ void InitCrashReporter(const std::string& process_type) { } #if defined(OS_ANDROID) -void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) { +void InitNonBrowserCrashReporterForAndroid() { const CommandLine* command_line = CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kEnableCrashReporter)) { // On Android we need to provide a FD to the file where the minidump is @@ -1510,7 +1519,7 @@ void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) { if (minidump_fd == base::kInvalidPlatformFileValue) { NOTREACHED() << "Could not find minidump FD, crash reporting disabled."; } else { - EnableNonBrowserCrashDumping(process_type, minidump_fd); + EnableNonBrowserCrashDumping(minidump_fd); } } } diff --git a/components/breakpad/app/breakpad_linux.h b/components/breakpad/app/breakpad_linux.h index b507c92..47e537c 100644 --- a/components/breakpad/app/breakpad_linux.h +++ b/components/breakpad/app/breakpad_linux.h @@ -7,19 +7,16 @@ #ifndef COMPONENTS_BREAKPAD_APP_BREAKPAD_LINUX_H_ #define COMPONENTS_BREAKPAD_APP_BREAKPAD_LINUX_H_ -#include <string> - #include "build/build_config.h" namespace breakpad { // Turns on the crash reporter in any process. -extern void InitCrashReporter(const std::string& process_type); +extern void InitCrashReporter(); // Enables the crash reporter in child processes. #if defined(OS_ANDROID) -extern void InitNonBrowserCrashReporterForAndroid( - const std::string& process_type); +extern void InitNonBrowserCrashReporterForAndroid(); #endif // Checks if crash reporting is enabled. Note that this is not the same as diff --git a/components/breakpad/app/breakpad_mac.h b/components/breakpad/app/breakpad_mac.h index 1db6d75..1743df6 100644 --- a/components/breakpad/app/breakpad_mac.h +++ b/components/breakpad/app/breakpad_mac.h @@ -5,19 +5,17 @@ #ifndef COMPONENTS_BREAKPAD_APP_BREAKPAD_MAC_H_ #define COMPONENTS_BREAKPAD_APP_BREAKPAD_MAC_H_ -#include <string> - // This header defines the entry points for Breakpad integration. namespace breakpad { // Initializes Breakpad. -void InitCrashReporter(const std::string& process_type); +void InitCrashReporter(); // Give Breakpad a chance to store information about the current process. // Extra information requires a parsed command line, so call this after // CommandLine::Init has been called. -void InitCrashProcessInfo(const std::string& process_type_switch); +void InitCrashProcessInfo(); // Is Breakpad enabled? bool IsCrashReporterEnabled(); diff --git a/components/breakpad/app/breakpad_mac.mm b/components/breakpad/app/breakpad_mac.mm index b6cac42..6cdd33d 100644 --- a/components/breakpad/app/breakpad_mac.mm +++ b/components/breakpad/app/breakpad_mac.mm @@ -24,6 +24,7 @@ #include "base/threading/thread_restrictions.h" #import "breakpad/src/client/mac/Framework/Breakpad.h" #include "components/breakpad/app/breakpad_client.h" +#include "content/public/common/content_switches.h" namespace breakpad { @@ -146,7 +147,7 @@ bool IsCrashReporterEnabled() { } // Only called for a branded build of Chrome.app. -void InitCrashReporter(const std::string& process_type) { +void InitCrashReporter() { DCHECK(!gBreakpadRef); base::mac::ScopedNSAutoreleasePool autorelease_pool; @@ -255,13 +256,16 @@ void InitCrashReporter(const std::string& process_type) { CHECK(0 == sigaction(SIGABRT, &sigact, NULL)); } -void InitCrashProcessInfo(const std::string& process_type_switch) { +void InitCrashProcessInfo() { if (gBreakpadRef == NULL) { return; } // Determine the process type. NSString* process_type = @"browser"; + std::string process_type_switch = + CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kProcessType); if (!process_type_switch.empty()) { process_type = base::SysUTF8ToNSString(process_type_switch); } diff --git a/components/breakpad/app/breakpad_mac_stubs.mm b/components/breakpad/app/breakpad_mac_stubs.mm index a05e150..6360ab8 100644 --- a/components/breakpad/app/breakpad_mac_stubs.mm +++ b/components/breakpad/app/breakpad_mac_stubs.mm @@ -15,10 +15,10 @@ bool IsCrashReporterEnabled() { return false; } -void InitCrashProcessInfo(const std::string& process_type_switch) { +void InitCrashProcessInfo() { } -void InitCrashReporter(const std::string& process_type) { +void InitCrashReporter() { } } // namespace breakpad diff --git a/components/breakpad/app/breakpad_win.cc b/components/breakpad/app/breakpad_win.cc index af1f136..29e442e 100644 --- a/components/breakpad/app/breakpad_win.cc +++ b/components/breakpad/app/breakpad_win.cc @@ -31,6 +31,7 @@ #include "breakpad/src/client/windows/handler/exception_handler.h" #include "components/breakpad/app/breakpad_client.h" #include "components/breakpad/app/hard_error_handler_win.h" +#include "content/public/common/content_switches.h" #include "content/public/common/result_codes.h" #include "sandbox/win/src/nt_internals.h" #include "sandbox/win/src/sidestep/preamble_patcher.h" @@ -130,7 +131,7 @@ DWORD WINAPI DumpProcessWithoutCrashThread(void*) { // of pepper/renderer processes is reduced. DWORD WINAPI DumpForHangDebuggingThread(void*) { DumpProcessWithoutCrash(); - VLOG(1) << "dumped for hang debugging"; + LOG(INFO) << "dumped for hang debugging"; return 0; } @@ -486,6 +487,13 @@ bool ShowRestartDialogIfCrashed(bool* exit_now) { if (base::win::IsMetroProcess()) return false; + // Only show this for the browser process. See crbug.com/132119. + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + std::string process_type = + command_line.GetSwitchValueASCII(switches::kProcessType); + if (!process_type.empty()) + return false; + base::string16 message; base::string16 title; bool is_rtl_locale; @@ -657,7 +665,7 @@ void InitDefaultCrashCallback(LPTOP_LEVEL_EXCEPTION_FILTER filter) { previous_filter = SetUnhandledExceptionFilter(filter); } -void InitCrashReporter(const std::string& process_type_switch) { +void InitCrashReporter() { const CommandLine& command = *CommandLine::ForCurrentProcess(); if (command.HasSwitch(switches::kDisableBreakpad)) return; @@ -665,7 +673,8 @@ void InitCrashReporter(const std::string& process_type_switch) { // Disable the message box for assertions. _CrtSetReportMode(_CRT_ASSERT, 0); - std::wstring process_type = ASCIIToWide(process_type_switch); + std::wstring process_type = + command.GetSwitchValueNative(switches::kProcessType); if (process_type.empty()) process_type = L"browser"; diff --git a/components/breakpad/app/breakpad_win.h b/components/breakpad/app/breakpad_win.h index 926192d..3e81a78 100644 --- a/components/breakpad/app/breakpad_win.h +++ b/components/breakpad/app/breakpad_win.h @@ -11,7 +11,7 @@ namespace breakpad { -void InitCrashReporter(const std::string& process_type_switch); +void InitCrashReporter(); // If chrome has been restarted because it crashed, this function will display // a dialog asking for permission to continue execution or to exit now. diff --git a/content/shell/app/shell_breakpad_client.cc b/content/shell/app/shell_breakpad_client.cc index 0e7cb95..8e8a7d0 100644 --- a/content/shell/app/shell_breakpad_client.cc +++ b/content/shell/app/shell_breakpad_client.cc @@ -8,7 +8,6 @@ #include "base/files/file_path.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" -#include "content/public/common/content_switches.h" #include "content/shell/common/shell_switches.h" #if defined(OS_ANDROID) @@ -60,13 +59,4 @@ int ShellBreakpadClient::GetAndroidMinidumpDescriptor() { } #endif -bool ShellBreakpadClient::EnableBreakpadForProcess( - const std::string& process_type) { - return process_type == switches::kRendererProcess || - process_type == switches::kPluginProcess || - process_type == switches::kPpapiPluginProcess || - process_type == switches::kZygoteProcess || - process_type == switches::kGpuProcess; -} - } // namespace content diff --git a/content/shell/app/shell_breakpad_client.h b/content/shell/app/shell_breakpad_client.h index 5f06cce..63d3024 100644 --- a/content/shell/app/shell_breakpad_client.h +++ b/content/shell/app/shell_breakpad_client.h @@ -43,9 +43,6 @@ class ShellBreakpadClient : public breakpad::BreakpadClient { virtual int GetAndroidMinidumpDescriptor() OVERRIDE; #endif - virtual bool EnableBreakpadForProcess( - const std::string& process_type) OVERRIDE; - private: DISALLOW_COPY_AND_ASSIGN(ShellBreakpadClient); }; diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc index 9966c4a..69acb62 100644 --- a/content/shell/app/shell_main_delegate.cc +++ b/content/shell/app/shell_main_delegate.cc @@ -192,23 +192,23 @@ bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { void ShellMainDelegate::PreSandboxStartup() { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableCrashReporter)) { - std::string process_type = - CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kProcessType); breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); #if defined(OS_MACOSX) base::mac::DisableOSCrashDumps(); - breakpad::InitCrashReporter(process_type); - breakpad::InitCrashProcessInfo(process_type); + breakpad::InitCrashReporter(); + breakpad::InitCrashProcessInfo(); #elif defined(OS_POSIX) && !defined(OS_MACOSX) + std::string process_type = + CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kProcessType); if (process_type != switches::kZygoteProcess) { #if defined(OS_ANDROID) if (process_type.empty()) - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); else - breakpad::InitNonBrowserCrashReporterForAndroid(process_type); + breakpad::InitNonBrowserCrashReporterForAndroid(); #else - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); #endif } #elif defined(OS_WIN) @@ -216,7 +216,7 @@ void ShellMainDelegate::PreSandboxStartup() { SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX; UINT existing_flags = SetErrorMode(new_flags); SetErrorMode(existing_flags | new_flags); - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); #endif } @@ -243,10 +243,7 @@ int ShellMainDelegate::RunProcess( void ShellMainDelegate::ZygoteForked() { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableCrashReporter)) { - std::string process_type = - CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kProcessType); - breakpad::InitCrashReporter(process_type); + breakpad::InitCrashReporter(); } } #endif |