Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 64193003: Clean up PrefServiceBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 DCHECK(!created_local_state_ && local_state_.get() == NULL); 856 DCHECK(!created_local_state_ && local_state_.get() == NULL);
857 created_local_state_ = true; 857 created_local_state_ = true;
858 858
859 base::FilePath local_state_path; 859 base::FilePath local_state_path;
860 CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); 860 CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path));
861 scoped_refptr<PrefRegistrySimple> pref_registry = new PrefRegistrySimple; 861 scoped_refptr<PrefRegistrySimple> pref_registry = new PrefRegistrySimple;
862 862
863 // Register local state preferences. 863 // Register local state preferences.
864 chrome::RegisterLocalState(pref_registry.get()); 864 chrome::RegisterLocalState(pref_registry.get());
865 865
866 local_state_.reset( 866 local_state_ =
867 chrome_prefs::CreateLocalState(local_state_path, 867 chrome_prefs::CreateLocalState(local_state_path,
868 local_state_task_runner_.get(), 868 local_state_task_runner_.get(),
869 policy_service(), 869 policy_service(),
870 pref_registry, 870 pref_registry,
871 false)); 871 false).Pass();
872 872
873 pref_change_registrar_.Init(local_state_.get()); 873 pref_change_registrar_.Init(local_state_.get());
874 874
875 // Initialize the notification for the default browser setting policy. 875 // Initialize the notification for the default browser setting policy.
876 pref_change_registrar_.Add( 876 pref_change_registrar_.Add(
877 prefs::kDefaultBrowserSettingEnabled, 877 prefs::kDefaultBrowserSettingEnabled,
878 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy, 878 base::Bind(&BrowserProcessImpl::ApplyDefaultBrowserPolicy,
879 base::Unretained(this))); 879 base::Unretained(this)));
880 880
881 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy); 881 int max_per_proxy = local_state_->GetInteger(prefs::kMaxConnectionsPerProxy);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 } 1078 }
1079 1079
1080 void BrowserProcessImpl::OnAutoupdateTimer() { 1080 void BrowserProcessImpl::OnAutoupdateTimer() {
1081 if (CanAutorestartForUpdate()) { 1081 if (CanAutorestartForUpdate()) {
1082 DLOG(WARNING) << "Detected update. Restarting browser."; 1082 DLOG(WARNING) << "Detected update. Restarting browser.";
1083 RestartBackgroundInstance(); 1083 RestartBackgroundInstance();
1084 } 1084 }
1085 } 1085 }
1086 1086
1087 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1087 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698