| 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 // a candidate for removal. | 846 // a candidate for removal. |
| 847 // Initialize ResourceBundle which handles files loaded from external | 847 // Initialize ResourceBundle which handles files loaded from external |
| 848 // sources. This has to be done before uninstall code path and before prefs | 848 // sources. This has to be done before uninstall code path and before prefs |
| 849 // are registered. | 849 // are registered. |
| 850 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 850 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
| 851 #if defined(OS_CHROMEOS) | 851 #if defined(OS_CHROMEOS) |
| 852 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); | 852 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); |
| 853 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, | 853 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, |
| 854 std::string()); | 854 std::string()); |
| 855 #endif // defined(OS_CHROMEOS) | 855 #endif // defined(OS_CHROMEOS) |
| 856 |
| 857 #if defined(ENABLE_REPORTING_BLIMP) |
| 858 // Enables reporting for the (headless) blimp engine. Defined in |
| 859 // components/metrics/BUILD.gn |
| 860 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, true); |
| 861 #else |
| 856 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, | 862 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, |
| 857 GoogleUpdateSettings::GetCollectStatsConsent()); | 863 GoogleUpdateSettings::GetCollectStatsConsent()); |
| 864 #endif // defined(ENABLE_REPORTING_HEADLESS) |
| 865 |
| 858 #if BUILDFLAG(ANDROID_JAVA_UI) | 866 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 859 registry->RegisterBooleanPref( | 867 registry->RegisterBooleanPref( |
| 860 prefs::kCrashReportingEnabled, false); | 868 prefs::kCrashReportingEnabled, false); |
| 861 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 869 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 862 } | 870 } |
| 863 | 871 |
| 864 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { | 872 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { |
| 865 DCHECK(CalledOnValidThread()); | 873 DCHECK(CalledOnValidThread()); |
| 866 if (!download_request_limiter_.get()) | 874 if (!download_request_limiter_.get()) |
| 867 download_request_limiter_ = new DownloadRequestLimiter(); | 875 download_request_limiter_ = new DownloadRequestLimiter(); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 } | 1311 } |
| 1304 | 1312 |
| 1305 void BrowserProcessImpl::OnAutoupdateTimer() { | 1313 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1306 if (CanAutorestartForUpdate()) { | 1314 if (CanAutorestartForUpdate()) { |
| 1307 DLOG(WARNING) << "Detected update. Restarting browser."; | 1315 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1308 RestartBackgroundInstance(); | 1316 RestartBackgroundInstance(); |
| 1309 } | 1317 } |
| 1310 } | 1318 } |
| 1311 | 1319 |
| 1312 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1320 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |