OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "apps/prefs.h" | 7 #include "apps/prefs.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/about_flags.h" | 10 #include "chrome/browser/about_flags.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 chromeos::StartupUtils::RegisterPrefs(registry); | 261 chromeos::StartupUtils::RegisterPrefs(registry); |
262 policy::AutoEnrollmentClient::RegisterPrefs(registry); | 262 policy::AutoEnrollmentClient::RegisterPrefs(registry); |
263 policy::DeviceStatusCollector::RegisterPrefs(registry); | 263 policy::DeviceStatusCollector::RegisterPrefs(registry); |
264 #endif | 264 #endif |
265 | 265 |
266 #if defined(OS_MACOSX) | 266 #if defined(OS_MACOSX) |
267 confirm_quit::RegisterLocalState(registry); | 267 confirm_quit::RegisterLocalState(registry); |
268 #endif | 268 #endif |
269 } | 269 } |
270 | 270 |
271 void RegisterUserPrefs(PrefRegistrySyncable* registry) { | 271 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { |
272 // User prefs. Please keep this list alphabetized. | 272 // User prefs. Please keep this list alphabetized. |
273 AlternateErrorPageTabObserver::RegisterUserPrefs(registry); | 273 AlternateErrorPageTabObserver::RegisterUserPrefs(registry); |
274 autofill::AutofillDialogControllerImpl::RegisterUserPrefs(registry); | 274 autofill::AutofillDialogControllerImpl::RegisterUserPrefs(registry); |
275 autofill::AutofillManager::RegisterUserPrefs(registry); | 275 autofill::AutofillManager::RegisterUserPrefs(registry); |
276 BookmarkPromptPrefs::RegisterUserPrefs(registry); | 276 BookmarkPromptPrefs::RegisterUserPrefs(registry); |
277 bookmark_utils::RegisterUserPrefs(registry); | 277 bookmark_utils::RegisterUserPrefs(registry); |
278 browser_sync::SyncPrefs::RegisterUserPrefs(registry); | 278 browser_sync::SyncPrefs::RegisterUserPrefs(registry); |
279 chrome::RegisterInstantUserPrefs(registry); | 279 chrome::RegisterInstantUserPrefs(registry); |
280 ChromeContentBrowserClient::RegisterUserPrefs(registry); | 280 ChromeContentBrowserClient::RegisterUserPrefs(registry); |
281 ChromeDownloadManagerDelegate::RegisterUserPrefs(registry); | 281 ChromeDownloadManagerDelegate::RegisterUserPrefs(registry); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 RegisterUserPrefs(registry); | 364 RegisterUserPrefs(registry); |
365 FlagsUI::RegisterUserPrefs(registry); | 365 FlagsUI::RegisterUserPrefs(registry); |
366 #endif | 366 #endif |
367 | 367 |
368 #if defined(OS_WIN) | 368 #if defined(OS_WIN) |
369 NetworkProfileBubble::RegisterUserPrefs(registry); | 369 NetworkProfileBubble::RegisterUserPrefs(registry); |
370 #endif | 370 #endif |
371 | 371 |
372 // Prefs registered only for migration (clearing or moving to a new | 372 // Prefs registered only for migration (clearing or moving to a new |
373 // key) go here. | 373 // key) go here. |
374 registry->RegisterDictionaryPref(kBackupPref, new DictionaryValue(), | 374 registry->RegisterDictionaryPref( |
375 PrefRegistrySyncable::UNSYNCABLE_PREF); | 375 kBackupPref, |
| 376 new DictionaryValue(), |
| 377 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
376 } | 378 } |
377 | 379 |
378 void MigrateUserPrefs(Profile* profile) { | 380 void MigrateUserPrefs(Profile* profile) { |
379 PrefService* prefs = profile->GetPrefs(); | 381 PrefService* prefs = profile->GetPrefs(); |
380 | 382 |
381 // Cleanup prefs from now-removed protector feature. | 383 // Cleanup prefs from now-removed protector feature. |
382 prefs->ClearPref(kBackupPref); | 384 prefs->ClearPref(kBackupPref); |
383 | 385 |
384 PrefsTabHelper::MigrateUserPrefs(prefs); | 386 PrefsTabHelper::MigrateUserPrefs(prefs); |
385 PromoResourceService::MigrateUserPrefs(prefs); | 387 PromoResourceService::MigrateUserPrefs(prefs); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 } | 452 } |
451 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 453 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
452 | 454 |
453 current_version |= GOOGLE_URL_TRACKER_PREFS; | 455 current_version |= GOOGLE_URL_TRACKER_PREFS; |
454 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 456 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
455 current_version); | 457 current_version); |
456 } | 458 } |
457 } | 459 } |
458 | 460 |
459 } // namespace chrome | 461 } // namespace chrome |
OLD | NEW |