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

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by mnissler. Created 9 years, 6 months 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/prefs/browser_prefs.h" 5 #include "chrome/browser/prefs/browser_prefs.h"
6 6
7 #include "chrome/browser/about_flags.h" 7 #include "chrome/browser/about_flags.h"
8 #include "chrome/browser/autofill/autofill_manager.h" 8 #include "chrome/browser/autofill/autofill_manager.h"
9 #include "chrome/browser/background_contents_service.h" 9 #include "chrome/browser/background_contents_service.h"
10 #include "chrome/browser/background_mode_manager.h" 10 #include "chrome/browser/background_mode_manager.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 BrowserWindowGtk::RegisterUserPrefs(user_prefs); 156 BrowserWindowGtk::RegisterUserPrefs(user_prefs);
157 #endif 157 #endif
158 #if defined(OS_CHROMEOS) 158 #if defined(OS_CHROMEOS)
159 chromeos::Preferences::RegisterUserPrefs(user_prefs); 159 chromeos::Preferences::RegisterUserPrefs(user_prefs);
160 #endif 160 #endif
161 BackgroundContentsService::RegisterUserPrefs(user_prefs); 161 BackgroundContentsService::RegisterUserPrefs(user_prefs);
162 SigninManager::RegisterUserPrefs(user_prefs); 162 SigninManager::RegisterUserPrefs(user_prefs);
163 TemplateURLService::RegisterUserPrefs(user_prefs); 163 TemplateURLService::RegisterUserPrefs(user_prefs);
164 InstantController::RegisterUserPrefs(user_prefs); 164 InstantController::RegisterUserPrefs(user_prefs);
165 NetPrefObserver::RegisterPrefs(user_prefs); 165 NetPrefObserver::RegisterPrefs(user_prefs);
166 // TODO(sfeuz): Remove registering of cloud policy refresh rate preference in
167 // |user_prefs| once we can push user cloud policies to local_state.
168 policy::CloudPolicySubsystem::RegisterPrefs(user_prefs);
169 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); 166 ProtocolHandlerRegistry::RegisterPrefs(user_prefs);
170 } 167 }
171 168
172 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { 169 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) {
173 // Copy pref values which have been migrated to user_prefs from local_state, 170 // Copy pref values which have been migrated to user_prefs from local_state,
174 // or remove them from local_state outright, if copying is not required. 171 // or remove them from local_state outright, if copying is not required.
175 int current_version = 172 int current_version =
176 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); 173 local_state->GetInteger(prefs::kMultipleProfilePrefMigration);
177 174
178 if ((current_version & WINDOWS_PREFS) == 0) { 175 if ((current_version & WINDOWS_PREFS) == 0) {
(...skipping 16 matching lines...) Expand all
195 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); 192 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue()));
196 } 193 }
197 local_state->ClearPref(prefs::kBrowserWindowPlacement); 194 local_state->ClearPref(prefs::kBrowserWindowPlacement);
198 195
199 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 196 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
200 current_version | WINDOWS_PREFS); 197 current_version | WINDOWS_PREFS);
201 } 198 }
202 } 199 }
203 200
204 } // namespace browser 201 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/policy/user_policy_identity_strategy.cc ('k') | chrome/browser/prefs/pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698