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

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

Issue 7014036: Split the policy refresh rate preference into user- and device-policy refresh rate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. 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
« no previous file with comments | « chrome/browser/policy/proto/chrome_device_policy.proto ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 TemplateURLModel::RegisterUserPrefs(user_prefs); 163 TemplateURLModel::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.
166 policy::CloudPolicySubsystem::RegisterPrefs(user_prefs); 168 policy::CloudPolicySubsystem::RegisterPrefs(user_prefs);
167 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); 169 ProtocolHandlerRegistry::RegisterPrefs(user_prefs);
168 } 170 }
169 171
170 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { 172 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) {
171 // Copy pref values which have been migrated to user_prefs from local_state, 173 // Copy pref values which have been migrated to user_prefs from local_state,
172 // or remove them from local_state outright, if copying is not required. 174 // or remove them from local_state outright, if copying is not required.
173 int current_version = 175 int current_version =
174 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); 176 local_state->GetInteger(prefs::kMultipleProfilePrefMigration);
175 177
(...skipping 17 matching lines...) Expand all
193 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); 195 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue()));
194 } 196 }
195 local_state->ClearPref(prefs::kBrowserWindowPlacement); 197 local_state->ClearPref(prefs::kBrowserWindowPlacement);
196 198
197 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 199 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
198 current_version | WINDOWS_PREFS); 200 current_version | WINDOWS_PREFS);
199 } 201 }
200 } 202 }
201 203
202 } // namespace browser 204 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/policy/proto/chrome_device_policy.proto ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698