Chromium Code Reviews| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 void MigrateUserPrefs(Profile* profile) { | 521 void MigrateUserPrefs(Profile* profile) { |
| 522 PrefService* prefs = profile->GetPrefs(); | 522 PrefService* prefs = profile->GetPrefs(); |
| 523 | 523 |
| 524 // Cleanup prefs from now-removed protector feature. | 524 // Cleanup prefs from now-removed protector feature. |
| 525 prefs->ClearPref(kBackupPref); | 525 prefs->ClearPref(kBackupPref); |
| 526 | 526 |
| 527 #if !defined(OS_ANDROID) | 527 #if !defined(OS_ANDROID) |
| 528 // Cleanup now-removed sync promo error message preference. | 528 // Cleanup now-removed sync promo error message preference. |
| 529 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442). | 529 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442). |
| 530 prefs->ClearPref(kSyncPromoErrorMessage); | 530 prefs->ClearPref(kSyncPromoErrorMessage); |
| 531 // Migrate kNetworkPredictionEnabled to kNetworkPredictionOptions when not on | |
| 532 // Android. On Android, platform-specific code performs preference migration. | |
| 533 // TODO(bnc): https://crbug.com/401970 Remove migration code after some time. | |
|
Bernhard Bauer
2014/08/11 09:01:33
Nit: Instead of "after some time", could you defin
Bence
2014/08/11 13:39:45
Done.
| |
| 534 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); | |
| 531 #endif | 535 #endif |
| 532 | 536 |
| 533 PromoResourceService::MigrateUserPrefs(prefs); | 537 PromoResourceService::MigrateUserPrefs(prefs); |
| 534 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 538 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 535 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); | |
| 536 | 539 |
| 537 #if defined(OS_MACOSX) && !defined(OS_IOS) | 540 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 538 autofill::AutofillManager::MigrateUserPrefs(prefs); | 541 autofill::AutofillManager::MigrateUserPrefs(prefs); |
| 539 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 542 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 540 } | 543 } |
| 541 | 544 |
| 542 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { | 545 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { |
| 543 // Copy pref values which have been migrated to user_prefs from local_state, | 546 // Copy pref values which have been migrated to user_prefs from local_state, |
| 544 // or remove them from local_state outright, if copying is not required. | 547 // or remove them from local_state outright, if copying is not required. |
| 545 int current_version = | 548 int current_version = |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 606 #if defined(OS_CHROMEOS) | 609 #if defined(OS_CHROMEOS) |
| 607 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); | 610 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); |
| 608 #endif | 611 #endif |
| 609 | 612 |
| 610 #if defined(TOOLKIT_VIEWS) | 613 #if defined(TOOLKIT_VIEWS) |
| 611 MigrateBrowserTabStripPrefs(local_state); | 614 MigrateBrowserTabStripPrefs(local_state); |
| 612 #endif | 615 #endif |
| 613 } | 616 } |
| 614 | 617 |
| 615 } // namespace chrome | 618 } // namespace chrome |
| OLD | NEW |