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