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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 372 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
373 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); | 373 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); |
374 PrefsTabHelper::RegisterProfilePrefs(registry); | 374 PrefsTabHelper::RegisterProfilePrefs(registry); |
375 Profile::RegisterProfilePrefs(registry); | 375 Profile::RegisterProfilePrefs(registry); |
376 ProfileImpl::RegisterProfilePrefs(registry); | 376 ProfileImpl::RegisterProfilePrefs(registry); |
377 PromoResourceService::RegisterProfilePrefs(registry); | 377 PromoResourceService::RegisterProfilePrefs(registry); |
378 ProtocolHandlerRegistry::RegisterProfilePrefs(registry); | 378 ProtocolHandlerRegistry::RegisterProfilePrefs(registry); |
379 RegisterBrowserUserPrefs(registry); | 379 RegisterBrowserUserPrefs(registry); |
380 SessionStartupPref::RegisterProfilePrefs(registry); | 380 SessionStartupPref::RegisterProfilePrefs(registry); |
381 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 381 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
382 TranslatePrefs::RegisterProfilePrefs(registry); | 382 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
383 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 383 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
384 | 384 |
385 #if defined(ENABLE_AUTOFILL_DIALOG) | 385 #if defined(ENABLE_AUTOFILL_DIALOG) |
386 autofill::AutofillDialogController::RegisterProfilePrefs(registry); | 386 autofill::AutofillDialogController::RegisterProfilePrefs(registry); |
387 #endif | 387 #endif |
388 | 388 |
389 #if defined(ENABLE_CONFIGURATION_POLICY) | 389 #if defined(ENABLE_CONFIGURATION_POLICY) |
390 policy::URLBlacklistManager::RegisterProfilePrefs(registry); | 390 policy::URLBlacklistManager::RegisterProfilePrefs(registry); |
391 #endif | 391 #endif |
392 | 392 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 // Cleanup prefs from now-removed protector feature. | 518 // Cleanup prefs from now-removed protector feature. |
519 prefs->ClearPref(kBackupPref); | 519 prefs->ClearPref(kBackupPref); |
520 | 520 |
521 #if !defined(OS_ANDROID) | 521 #if !defined(OS_ANDROID) |
522 // Cleanup now-removed sync promo error message preference. | 522 // Cleanup now-removed sync promo error message preference. |
523 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442). | 523 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442). |
524 prefs->ClearPref(kSyncPromoErrorMessage); | 524 prefs->ClearPref(kSyncPromoErrorMessage); |
525 #endif | 525 #endif |
526 | 526 |
527 PromoResourceService::MigrateUserPrefs(prefs); | 527 PromoResourceService::MigrateUserPrefs(prefs); |
528 TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 528 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
529 | 529 |
530 #if defined(OS_MACOSX) && !defined(OS_IOS) | 530 #if defined(OS_MACOSX) && !defined(OS_IOS) |
531 autofill::AutofillManager::MigrateUserPrefs(prefs); | 531 autofill::AutofillManager::MigrateUserPrefs(prefs); |
532 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 532 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
533 } | 533 } |
534 | 534 |
535 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { | 535 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { |
536 // Copy pref values which have been migrated to user_prefs from local_state, | 536 // Copy pref values which have been migrated to user_prefs from local_state, |
537 // or remove them from local_state outright, if copying is not required. | 537 // or remove them from local_state outright, if copying is not required. |
538 int current_version = | 538 int current_version = |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 #if defined(OS_CHROMEOS) | 595 #if defined(OS_CHROMEOS) |
596 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); | 596 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); |
597 #endif | 597 #endif |
598 | 598 |
599 #if defined(TOOLKIT_VIEWS) | 599 #if defined(TOOLKIT_VIEWS) |
600 MigrateBrowserTabStripPrefs(local_state); | 600 MigrateBrowserTabStripPrefs(local_state); |
601 #endif | 601 #endif |
602 } | 602 } |
603 | 603 |
604 } // namespace chrome | 604 } // namespace chrome |
OLD | NEW |