| 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); | 842 CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); |
| 843 scoped_refptr<PrefRegistrySimple> pref_registry = new PrefRegistrySimple; | 843 scoped_refptr<PrefRegistrySimple> pref_registry = new PrefRegistrySimple; |
| 844 | 844 |
| 845 // Register local state preferences. | 845 // Register local state preferences. |
| 846 chrome::RegisterLocalState(pref_registry.get()); | 846 chrome::RegisterLocalState(pref_registry.get()); |
| 847 | 847 |
| 848 local_state_.reset( | 848 local_state_.reset( |
| 849 chrome_prefs::CreateLocalState(local_state_path, | 849 chrome_prefs::CreateLocalState(local_state_path, |
| 850 local_state_task_runner_.get(), | 850 local_state_task_runner_.get(), |
| 851 policy_service(), | 851 policy_service(), |
| 852 NULL, | |
| 853 pref_registry, | 852 pref_registry, |
| 854 false)); | 853 false)); |
| 855 | 854 |
| 856 pref_change_registrar_.Init(local_state_.get()); | 855 pref_change_registrar_.Init(local_state_.get()); |
| 857 | 856 |
| 858 // Initialize the notification for the default browser setting policy. | 857 // Initialize the notification for the default browser setting policy. |
| 859 pref_change_registrar_.Add( | 858 pref_change_registrar_.Add( |
| 860 prefs::kDefaultBrowserSettingEnabled, | 859 prefs::kDefaultBrowserSettingEnabled, |
| 861 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy, | 860 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy, |
| 862 base::Unretained(this))); | 861 base::Unretained(this))); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 } | 1060 } |
| 1062 | 1061 |
| 1063 void BrowserProcessImpl::OnAutoupdateTimer() { | 1062 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1064 if (CanAutorestartForUpdate()) { | 1063 if (CanAutorestartForUpdate()) { |
| 1065 DLOG(WARNING) << "Detected update. Restarting browser."; | 1064 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1066 RestartBackgroundInstance(); | 1065 RestartBackgroundInstance(); |
| 1067 } | 1066 } |
| 1068 } | 1067 } |
| 1069 | 1068 |
| 1070 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1069 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |