Chromium Code Reviews| 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_HEADLESS) | |
|
Alexei Svitkine (slow)
2016/03/07 20:38:25
Please add a comment about what this is and point
Jess
2016/03/07 21:09:21
Done. PTAL.
| |
| 858 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, true); | |
| 859 #else | |
| 856 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, | 860 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, |
| 857 GoogleUpdateSettings::GetCollectStatsConsent()); | 861 GoogleUpdateSettings::GetCollectStatsConsent()); |
| 862 #endif // defined(ENABLE_REPORTING_HEADLESS) | |
| 863 | |
| 858 #if BUILDFLAG(ANDROID_JAVA_UI) | 864 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 859 registry->RegisterBooleanPref( | 865 registry->RegisterBooleanPref( |
| 860 prefs::kCrashReportingEnabled, false); | 866 prefs::kCrashReportingEnabled, false); |
| 861 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 867 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
| 862 } | 868 } |
| 863 | 869 |
| 864 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { | 870 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { |
| 865 DCHECK(CalledOnValidThread()); | 871 DCHECK(CalledOnValidThread()); |
| 866 if (!download_request_limiter_.get()) | 872 if (!download_request_limiter_.get()) |
| 867 download_request_limiter_ = new DownloadRequestLimiter(); | 873 download_request_limiter_ = new DownloadRequestLimiter(); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1303 } | 1309 } |
| 1304 | 1310 |
| 1305 void BrowserProcessImpl::OnAutoupdateTimer() { | 1311 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1306 if (CanAutorestartForUpdate()) { | 1312 if (CanAutorestartForUpdate()) { |
| 1307 DLOG(WARNING) << "Detected update. Restarting browser."; | 1313 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1308 RestartBackgroundInstance(); | 1314 RestartBackgroundInstance(); |
| 1309 } | 1315 } |
| 1310 } | 1316 } |
| 1311 | 1317 |
| 1312 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1318 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |