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/background_contents_service.h" | 9 #include "chrome/browser/background/background_contents_service.h" |
10 #include "chrome/browser/background/background_mode_manager.h" | 10 #include "chrome/browser/background/background_mode_manager.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 BrowserWindowGtk::RegisterUserPrefs(user_prefs); | 158 BrowserWindowGtk::RegisterUserPrefs(user_prefs); |
159 #endif | 159 #endif |
160 #if defined(OS_CHROMEOS) | 160 #if defined(OS_CHROMEOS) |
161 chromeos::Preferences::RegisterUserPrefs(user_prefs); | 161 chromeos::Preferences::RegisterUserPrefs(user_prefs); |
162 #endif | 162 #endif |
163 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 163 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
164 SigninManager::RegisterUserPrefs(user_prefs); | 164 SigninManager::RegisterUserPrefs(user_prefs); |
165 TemplateURLService::RegisterUserPrefs(user_prefs); | 165 TemplateURLService::RegisterUserPrefs(user_prefs); |
166 InstantController::RegisterUserPrefs(user_prefs); | 166 InstantController::RegisterUserPrefs(user_prefs); |
167 NetPrefObserver::RegisterPrefs(user_prefs); | 167 NetPrefObserver::RegisterPrefs(user_prefs); |
168 // TODO(sfeuz): Remove registering of cloud policy refresh rate preference in | |
169 // |user_prefs| once we can push user cloud policies to local_state. | |
170 policy::CloudPolicySubsystem::RegisterPrefs(user_prefs); | |
171 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); | 168 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); |
172 } | 169 } |
173 | 170 |
174 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 171 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
175 // Copy pref values which have been migrated to user_prefs from local_state, | 172 // Copy pref values which have been migrated to user_prefs from local_state, |
176 // or remove them from local_state outright, if copying is not required. | 173 // or remove them from local_state outright, if copying is not required. |
177 int current_version = | 174 int current_version = |
178 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 175 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
179 | 176 |
180 if ((current_version & WINDOWS_PREFS) == 0) { | 177 if ((current_version & WINDOWS_PREFS) == 0) { |
(...skipping 16 matching lines...) Expand all Loading... |
197 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 194 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
198 } | 195 } |
199 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 196 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
200 | 197 |
201 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 198 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
202 current_version | WINDOWS_PREFS); | 199 current_version | WINDOWS_PREFS); |
203 } | 200 } |
204 } | 201 } |
205 | 202 |
206 } // namespace browser | 203 } // namespace browser |
OLD | NEW |