| 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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/browser/profiles/profile_impl.h" | 55 #include "chrome/browser/profiles/profile_impl.h" |
| 56 #include "chrome/browser/profiles/profile_info_cache.h" | 56 #include "chrome/browser/profiles/profile_info_cache.h" |
| 57 #include "chrome/browser/profiles/profiles_state.h" | 57 #include "chrome/browser/profiles/profiles_state.h" |
| 58 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h" | 58 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h" |
| 59 #include "chrome/browser/search/search.h" | 59 #include "chrome/browser/search/search.h" |
| 60 #include "chrome/browser/services/gcm/gcm_profile_service.h" | 60 #include "chrome/browser/services/gcm/gcm_profile_service.h" |
| 61 #include "chrome/browser/signin/signin_manager_factory.h" | 61 #include "chrome/browser/signin/signin_manager_factory.h" |
| 62 #include "chrome/browser/task_manager/task_manager.h" | 62 #include "chrome/browser/task_manager/task_manager.h" |
| 63 #include "chrome/browser/ui/app_list/app_list_prefs.h" | 63 #include "chrome/browser/ui/app_list/app_list_prefs.h" |
| 64 #include "chrome/browser/ui/app_list/app_list_service.h" | 64 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 65 #include "chrome/browser/ui/app_list/google_now_extension.h" |
| 65 #include "chrome/browser/ui/browser_ui_prefs.h" | 66 #include "chrome/browser/ui/browser_ui_prefs.h" |
| 66 #include "chrome/browser/ui/navigation_correction_tab_observer.h" | 67 #include "chrome/browser/ui/navigation_correction_tab_observer.h" |
| 67 #include "chrome/browser/ui/network_profile_bubble.h" | 68 #include "chrome/browser/ui/network_profile_bubble.h" |
| 68 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" | 69 #include "chrome/browser/ui/passwords/password_bubble_experiment.h" |
| 69 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 70 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
| 70 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" | 71 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" |
| 71 #include "chrome/browser/ui/startup/autolaunch_prompt.h" | 72 #include "chrome/browser/ui/startup/autolaunch_prompt.h" |
| 72 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 73 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 73 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" | 74 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" |
| 74 #include "chrome/browser/ui/webui/flags_ui.h" | 75 #include "chrome/browser/ui/webui/flags_ui.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 // M38. | 568 // M38. |
| 568 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); | 569 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); |
| 569 #endif | 570 #endif |
| 570 | 571 |
| 571 PromoResourceService::MigrateUserPrefs(prefs); | 572 PromoResourceService::MigrateUserPrefs(prefs); |
| 572 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 573 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 573 | 574 |
| 574 #if defined(OS_MACOSX) && !defined(OS_IOS) | 575 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 575 autofill::AutofillManager::MigrateUserPrefs(prefs); | 576 autofill::AutofillManager::MigrateUserPrefs(prefs); |
| 576 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 577 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 578 |
| 579 #if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST) |
| 580 MigrateGoogleNowPrefs(profile); |
| 581 #endif |
| 577 } | 582 } |
| 578 | 583 |
| 579 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { | 584 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { |
| 580 // Copy pref values which have been migrated to user_prefs from local_state, | 585 // Copy pref values which have been migrated to user_prefs from local_state, |
| 581 // or remove them from local_state outright, if copying is not required. | 586 // or remove them from local_state outright, if copying is not required. |
| 582 int current_version = | 587 int current_version = |
| 583 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 588 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
| 584 PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>( | 589 PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>( |
| 585 local_state->DeprecatedGetPrefRegistry()); | 590 local_state->DeprecatedGetPrefRegistry()); |
| 586 | 591 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); | 678 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); |
| 674 | 679 |
| 675 // We're done migrating the profile per-host zoom level values, so we clear | 680 // We're done migrating the profile per-host zoom level values, so we clear |
| 676 // them all. | 681 // them all. |
| 677 DictionaryPrefUpdate host_zoom_dictionary_update( | 682 DictionaryPrefUpdate host_zoom_dictionary_update( |
| 678 prefs, prefs::kPerHostZoomLevelsDeprecated); | 683 prefs, prefs::kPerHostZoomLevelsDeprecated); |
| 679 host_zoom_dictionary_update->Clear(); | 684 host_zoom_dictionary_update->Clear(); |
| 680 } | 685 } |
| 681 | 686 |
| 682 } // namespace chrome | 687 } // namespace chrome |
| OLD | NEW |