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_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 #include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h" | 193 #include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h" |
194 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" | 194 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" |
195 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 195 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
196 #include "chromeos/audio/audio_devices_pref_handler_impl.h" | 196 #include "chromeos/audio/audio_devices_pref_handler_impl.h" |
197 #include "chromeos/timezone/timezone_resolver.h" | 197 #include "chromeos/timezone/timezone_resolver.h" |
198 #include "components/invalidation/invalidator_storage.h" | 198 #include "components/invalidation/invalidator_storage.h" |
199 #else | 199 #else |
200 #include "chrome/browser/extensions/default_apps.h" | 200 #include "chrome/browser/extensions/default_apps.h" |
201 #endif | 201 #endif |
202 | 202 |
| 203 #if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST) |
| 204 #include "chrome/browser/ui/app_list/google_now_extension.h" |
| 205 #endif |
| 206 |
203 #if defined(OS_MACOSX) | 207 #if defined(OS_MACOSX) |
204 #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" | 208 #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" |
205 #include "chrome/browser/ui/cocoa/confirm_quit.h" | 209 #include "chrome/browser/ui/cocoa/confirm_quit.h" |
206 #endif | 210 #endif |
207 | 211 |
208 #if defined(OS_WIN) | 212 #if defined(OS_WIN) |
209 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" | 213 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" |
210 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 214 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
211 #endif | 215 #endif |
212 | 216 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 // M38. | 572 // M38. |
569 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); | 573 chrome_browser_net::MigrateNetworkPredictionUserPrefs(prefs); |
570 #endif | 574 #endif |
571 | 575 |
572 PromoResourceService::MigrateUserPrefs(prefs); | 576 PromoResourceService::MigrateUserPrefs(prefs); |
573 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 577 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
574 | 578 |
575 #if defined(OS_MACOSX) && !defined(OS_IOS) | 579 #if defined(OS_MACOSX) && !defined(OS_IOS) |
576 autofill::AutofillManager::MigrateUserPrefs(prefs); | 580 autofill::AutofillManager::MigrateUserPrefs(prefs); |
577 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 581 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 582 |
| 583 #if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST) |
| 584 MigrateGoogleNowPrefs(profile); |
| 585 #endif |
578 } | 586 } |
579 | 587 |
580 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { | 588 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { |
581 // Copy pref values which have been migrated to user_prefs from local_state, | 589 // Copy pref values which have been migrated to user_prefs from local_state, |
582 // or remove them from local_state outright, if copying is not required. | 590 // or remove them from local_state outright, if copying is not required. |
583 int current_version = | 591 int current_version = |
584 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 592 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
585 PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>( | 593 PrefRegistrySimple* registry = static_cast<PrefRegistrySimple*>( |
586 local_state->DeprecatedGetPrefRegistry()); | 594 local_state->DeprecatedGetPrefRegistry()); |
587 | 595 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); | 682 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); |
675 | 683 |
676 // We're done migrating the profile per-host zoom level values, so we clear | 684 // We're done migrating the profile per-host zoom level values, so we clear |
677 // them all. | 685 // them all. |
678 DictionaryPrefUpdate host_zoom_dictionary_update( | 686 DictionaryPrefUpdate host_zoom_dictionary_update( |
679 prefs, prefs::kPerHostZoomLevelsDeprecated); | 687 prefs, prefs::kPerHostZoomLevelsDeprecated); |
680 host_zoom_dictionary_update->Clear(); | 688 host_zoom_dictionary_update->Clear(); |
681 } | 689 } |
682 | 690 |
683 } // namespace chrome | 691 } // namespace chrome |
OLD | NEW |