Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 456813002: Do not migrate NetworkPrediction preference on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specify TODO timeframe in comment. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 one year after
534 // M38.
535 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs);
531 #endif 536 #endif
532 537
533 PromoResourceService::MigrateUserPrefs(prefs); 538 PromoResourceService::MigrateUserPrefs(prefs);
534 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); 539 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages);
535 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs);
536 540
537 #if defined(OS_MACOSX) && !defined(OS_IOS) 541 #if defined(OS_MACOSX) && !defined(OS_IOS)
538 autofill::AutofillManager::MigrateUserPrefs(prefs); 542 autofill::AutofillManager::MigrateUserPrefs(prefs);
539 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 543 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
540 } 544 }
541 545
542 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { 546 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) {
543 // Copy pref values which have been migrated to user_prefs from local_state, 547 // 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. 548 // or remove them from local_state outright, if copying is not required.
545 int current_version = 549 int current_version =
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 #if defined(OS_CHROMEOS) 610 #if defined(OS_CHROMEOS)
607 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); 611 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state);
608 #endif 612 #endif
609 613
610 #if defined(TOOLKIT_VIEWS) 614 #if defined(TOOLKIT_VIEWS)
611 MigrateBrowserTabStripPrefs(local_state); 615 MigrateBrowserTabStripPrefs(local_state);
612 #endif 616 #endif
613 } 617 }
614 618
615 } // namespace chrome 619 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698