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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 // a candidate for removal. | 820 // a candidate for removal. |
821 // Initialize ResourceBundle which handles files loaded from external | 821 // Initialize ResourceBundle which handles files loaded from external |
822 // sources. This has to be done before uninstall code path and before prefs | 822 // sources. This has to be done before uninstall code path and before prefs |
823 // are registered. | 823 // are registered. |
824 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 824 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
825 #if defined(OS_CHROMEOS) | 825 #if defined(OS_CHROMEOS) |
826 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); | 826 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); |
827 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, | 827 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, |
828 std::string()); | 828 std::string()); |
829 #endif // defined(OS_CHROMEOS) | 829 #endif // defined(OS_CHROMEOS) |
830 #if !defined(OS_CHROMEOS) | 830 |
831 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, | 831 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, |
832 GoogleUpdateSettings::GetCollectStatsConsent()); | 832 GoogleUpdateSettings::GetCollectStatsConsent()); |
833 #endif // !defined(OS_CHROMEOS) | |
834 | |
835 #if defined(OS_ANDROID) | 833 #if defined(OS_ANDROID) |
836 registry->RegisterBooleanPref( | 834 registry->RegisterBooleanPref( |
837 prefs::kCrashReportingEnabled, false); | 835 prefs::kCrashReportingEnabled, false); |
838 #endif // defined(OS_ANDROID) | 836 #endif // defined(OS_ANDROID) |
839 } | 837 } |
840 | 838 |
841 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { | 839 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { |
842 DCHECK(CalledOnValidThread()); | 840 DCHECK(CalledOnValidThread()); |
843 if (!download_request_limiter_.get()) | 841 if (!download_request_limiter_.get()) |
844 download_request_limiter_ = new DownloadRequestLimiter(); | 842 download_request_limiter_ = new DownloadRequestLimiter(); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 } | 1279 } |
1282 | 1280 |
1283 void BrowserProcessImpl::OnAutoupdateTimer() { | 1281 void BrowserProcessImpl::OnAutoupdateTimer() { |
1284 if (CanAutorestartForUpdate()) { | 1282 if (CanAutorestartForUpdate()) { |
1285 DLOG(WARNING) << "Detected update. Restarting browser."; | 1283 DLOG(WARNING) << "Detected update. Restarting browser."; |
1286 RestartBackgroundInstance(); | 1284 RestartBackgroundInstance(); |
1287 } | 1285 } |
1288 } | 1286 } |
1289 | 1287 |
1290 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1288 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |