| Index: chrome/browser/chrome_browser_main_android.cc
|
| diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc
|
| index 42dd90f99b7b37d267bb8068a5983752a55f2c4d..7b80866736b87980d72caa969cccce539d46f0e3 100644
|
| --- a/chrome/browser/chrome_browser_main_android.cc
|
| +++ b/chrome/browser/chrome_browser_main_android.cc
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "chrome/browser/chrome_browser_main_android.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/path_service.h"
|
| #include "chrome/app/breakpad_linux.h"
|
| #include "chrome/browser/android/crash_dump_manager.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/env_vars.h"
|
| #include "content/public/browser/android/compositor.h"
|
| #include "content/public/common/main_function_params.h"
|
| @@ -33,9 +35,18 @@ void ChromeBrowserMainPartsAndroid::PreProfileInit() {
|
| #else
|
| bool breakpad_enabled = false;
|
| #endif
|
| - // Allow Breakpad to be enabled in Chromium builds for testing purposes.
|
| +
|
| + // Allow Breakpad to be enabled in Chromium builds for testing purposes. On
|
| + // Android use a command-line flag which is easier to set than an environment
|
| + // variable.
|
| +#if defined(OS_ANDROID)
|
| + if (!breakpad_enabled)
|
| + breakpad_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBreakpad);
|
| +#else
|
| if (!breakpad_enabled)
|
| breakpad_enabled = getenv(env_vars::kEnableBreakpad) != NULL;
|
| +#endif
|
|
|
| if (breakpad_enabled) {
|
| InitCrashReporter();
|
|
|