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 0846570df2ef11348d62d61a8cd0f63d0a72ac8a..354a92de3b2b1341d6fc3048dd08e901e2b7b23f 100644 |
--- a/chrome/browser/chrome_browser_main_android.cc |
+++ b/chrome/browser/chrome_browser_main_android.cc |
@@ -23,10 +23,20 @@ ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { |
void ChromeBrowserMainPartsAndroid::PreProfileInit() { |
#if defined(USE_LINUX_BREAKPAD) |
+#if defined(GOOGLE_CHROME_BUILD) |
// TODO(jcivelli): we should not initialize the crash-reporter when it was not |
// enabled. Right now if it is disabled we still generate the minidumps but we |
// do not upload them. |
- InitCrashReporter(); |
+ bool breakpad_enabled = true; |
+#else |
+ bool breakpad_enabled = false; |
+#endif |
+ // Allow Breakpad to be enabled in Chromium builds for testing purposes. |
+ if (!breakpad_enabled) |
+ breakpad_enabled = getenv(env_vars::kEnableBreakpad) != NULL; |
+ |
+ if (breakpad_enabled) |
+ InitCrashReporter(); |
#endif |
ChromeBrowserMainParts::PreProfileInit(); |