| 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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/alias.h" | 14 #include "base/debug/alias.h" |
| 15 #include "base/i18n/time_formatting.h" |
| 15 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 16 #include "base/prefs/json_pref_store.h" | 17 #include "base/prefs/json_pref_store.h" |
| 17 #include "base/prefs/pref_registry_simple.h" | 18 #include "base/prefs/pref_registry_simple.h" |
| 18 #include "base/prefs/pref_service.h" | 19 #include "base/prefs/pref_service.h" |
| 19 #include "base/synchronization/waitable_event.h" | 20 #include "base/synchronization/waitable_event.h" |
| 20 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
| 21 #include "base/threading/thread_restrictions.h" | 22 #include "base/threading/thread_restrictions.h" |
| 22 #include "chrome/browser/automation/automation_provider_list.h" | 23 #include "chrome/browser/automation/automation_provider_list.h" |
| 23 #include "chrome/browser/background/background_mode_manager.h" | 24 #include "chrome/browser/background/background_mode_manager.h" |
| 24 #include "chrome/browser/chrome_browser_main.h" | 25 #include "chrome/browser/chrome_browser_main.h" |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // initial commit. This comment seems unrelated, bit-rotten and | 691 // initial commit. This comment seems unrelated, bit-rotten and |
| 691 // a candidate for removal. | 692 // a candidate for removal. |
| 692 // Initialize ResourceBundle which handles files loaded from external | 693 // Initialize ResourceBundle which handles files loaded from external |
| 693 // sources. This has to be done before uninstall code path and before prefs | 694 // sources. This has to be done before uninstall code path and before prefs |
| 694 // are registered. | 695 // are registered. |
| 695 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 696 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
| 696 #if defined(OS_CHROMEOS) | 697 #if defined(OS_CHROMEOS) |
| 697 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); | 698 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); |
| 698 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, | 699 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, |
| 699 std::string()); | 700 std::string()); |
| 701 registry->RegisterBooleanPref(prefs::kOwnerPrefUse24HourClock, |
| 702 base::GetHourClockType() == base::k24HourClock); |
| 700 #endif // defined(OS_CHROMEOS) | 703 #endif // defined(OS_CHROMEOS) |
| 701 #if !defined(OS_CHROMEOS) | 704 #if !defined(OS_CHROMEOS) |
| 702 registry->RegisterBooleanPref( | 705 registry->RegisterBooleanPref( |
| 703 prefs::kMetricsReportingEnabled, | 706 prefs::kMetricsReportingEnabled, |
| 704 GoogleUpdateSettings::GetCollectStatsConsent()); | 707 GoogleUpdateSettings::GetCollectStatsConsent()); |
| 705 #endif // !defined(OS_CHROMEOS) | 708 #endif // !defined(OS_CHROMEOS) |
| 706 | 709 |
| 707 #if defined(OS_ANDROID) | 710 #if defined(OS_ANDROID) |
| 708 registry->RegisterBooleanPref( | 711 registry->RegisterBooleanPref( |
| 709 prefs::kCrashReportingEnabled, false); | 712 prefs::kCrashReportingEnabled, false); |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 } | 1074 } |
| 1072 | 1075 |
| 1073 void BrowserProcessImpl::OnAutoupdateTimer() { | 1076 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1074 if (CanAutorestartForUpdate()) { | 1077 if (CanAutorestartForUpdate()) { |
| 1075 DLOG(WARNING) << "Detected update. Restarting browser."; | 1078 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1076 RestartBackgroundInstance(); | 1079 RestartBackgroundInstance(); |
| 1077 } | 1080 } |
| 1078 } | 1081 } |
| 1079 | 1082 |
| 1080 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1083 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |