OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chrome_browser_main_android.h" | 5 #include "chrome/browser/chrome_browser_main_android.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "chrome/app/breakpad_linux.h" | 8 #include "chrome/app/breakpad_linux.h" |
9 #include "content/public/browser/android/compositor.h" | 9 #include "content/public/browser/android/compositor.h" |
10 #include "content/public/common/main_function_params.h" | 10 #include "content/public/common/main_function_params.h" |
11 #include "net/android/network_change_notifier_factory_android.h" | 11 #include "net/android/network_change_notifier_factory_android.h" |
12 #include "net/base/network_change_notifier.h" | 12 #include "net/base/network_change_notifier.h" |
13 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
14 #include "ui/base/ui_base_paths.h" | 14 #include "ui/base/ui_base_paths.h" |
15 | 15 |
16 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( | 16 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( |
17 const content::MainFunctionParams& parameters) | 17 const content::MainFunctionParams& parameters) |
18 : ChromeBrowserMainParts(parameters) { | 18 : ChromeBrowserMainParts(parameters) { |
19 } | 19 } |
20 | 20 |
21 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { | 21 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { |
22 } | 22 } |
23 | 23 |
24 void ChromeBrowserMainPartsAndroid::PreProfileInit() { | 24 void ChromeBrowserMainPartsAndroid::PreProfileInit() { |
25 #if defined(USE_LINUX_BREAKPAD) | 25 #if defined(USE_LINUX_BREAKPAD) |
| 26 #if defined(GOOGLE_CHROME_BUILD) |
26 // TODO(jcivelli): we should not initialize the crash-reporter when it was not | 27 // TODO(jcivelli): we should not initialize the crash-reporter when it was not |
27 // enabled. Right now if it is disabled we still generate the minidumps but we | 28 // enabled. Right now if it is disabled we still generate the minidumps but we |
28 // do not upload them. | 29 // do not upload them. |
29 InitCrashReporter(); | 30 bool breakpad_enabled = true; |
| 31 #else |
| 32 bool breakpad_enabled = false; |
| 33 #endif |
| 34 // Allow Breakpad to be enabled in Chromium builds for testing purposes. |
| 35 if (!breakpad_enabled) |
| 36 breakpad_enabled = getenv(env_vars::kEnableBreakpad) != NULL; |
| 37 |
| 38 if (breakpad_enabled) |
| 39 InitCrashReporter(); |
30 #endif | 40 #endif |
31 | 41 |
32 ChromeBrowserMainParts::PreProfileInit(); | 42 ChromeBrowserMainParts::PreProfileInit(); |
33 } | 43 } |
34 | 44 |
35 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | 45 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { |
36 net::NetworkChangeNotifier::SetFactory( | 46 net::NetworkChangeNotifier::SetFactory( |
37 new net::NetworkChangeNotifierFactoryAndroid()); | 47 new net::NetworkChangeNotifierFactoryAndroid()); |
38 | 48 |
39 content::Compositor::Initialize(); | 49 content::Compositor::Initialize(); |
(...skipping 25 matching lines...) Expand all Loading... |
65 NOTREACHED(); | 75 NOTREACHED(); |
66 } | 76 } |
67 | 77 |
68 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 78 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
69 // TODO: crbug.com/139023 | 79 // TODO: crbug.com/139023 |
70 NOTIMPLEMENTED(); | 80 NOTIMPLEMENTED(); |
71 } | 81 } |
72 | 82 |
73 void WarnAboutMinimumSystemRequirements() { | 83 void WarnAboutMinimumSystemRequirements() { |
74 } | 84 } |
OLD | NEW |