OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |