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 <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 policy_service(), | 806 policy_service(), |
807 NULL, | 807 NULL, |
808 pref_registry, | 808 pref_registry, |
809 false)); | 809 false)); |
810 | 810 |
811 // Initialize the prefs of the local state. | 811 // Initialize the prefs of the local state. |
812 // | 812 // |
813 // TODO(joi): Once we clean up so none of the registration methods | 813 // TODO(joi): Once we clean up so none of the registration methods |
814 // need the PrefService pointer, this should happen before the call | 814 // need the PrefService pointer, this should happen before the call |
815 // to CreateLocalState. | 815 // to CreateLocalState. |
816 chrome::RegisterLocalState(pref_registry, local_state_.get()); | 816 chrome::RegisterLocalState(local_state_.get(), pref_registry); |
817 | 817 |
818 pref_change_registrar_.Init(local_state_.get()); | 818 pref_change_registrar_.Init(local_state_.get()); |
819 | 819 |
820 // Initialize the notification for the default browser setting policy. | 820 // Initialize the notification for the default browser setting policy. |
821 pref_change_registrar_.Add( | 821 pref_change_registrar_.Add( |
822 prefs::kDefaultBrowserSettingEnabled, | 822 prefs::kDefaultBrowserSettingEnabled, |
823 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy, | 823 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy, |
824 base::Unretained(this))); | 824 base::Unretained(this))); |
825 | 825 |
826 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); | 826 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 } | 1031 } |
1032 | 1032 |
1033 void BrowserProcessImpl::OnAutoupdateTimer() { | 1033 void BrowserProcessImpl::OnAutoupdateTimer() { |
1034 if (CanAutorestartForUpdate()) { | 1034 if (CanAutorestartForUpdate()) { |
1035 DLOG(WARNING) << "Detected update. Restarting browser."; | 1035 DLOG(WARNING) << "Detected update. Restarting browser."; |
1036 RestartBackgroundInstance(); | 1036 RestartBackgroundInstance(); |
1037 } | 1037 } |
1038 } | 1038 } |
1039 | 1039 |
1040 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1040 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |