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

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

Issue 159883002: Move TranslatePrefs to the Translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceptLanguages
Patch Set: Fix ChromeOS browsertests Created 6 years, 10 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
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 "apps/prefs.h" 7 #include "apps/prefs.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "chrome/browser/profiles/profiles_state.h" 66 #include "chrome/browser/profiles/profiles_state.h"
67 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h" 67 #include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
68 #include "chrome/browser/renderer_host/web_cache_manager.h" 68 #include "chrome/browser/renderer_host/web_cache_manager.h"
69 #include "chrome/browser/search/search.h" 69 #include "chrome/browser/search/search.h"
70 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 70 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
71 #include "chrome/browser/services/gcm/gcm_profile_service.h" 71 #include "chrome/browser/services/gcm/gcm_profile_service.h"
72 #include "chrome/browser/signin/signin_manager_factory.h" 72 #include "chrome/browser/signin/signin_manager_factory.h"
73 #include "chrome/browser/signin/signin_promo.h" 73 #include "chrome/browser/signin/signin_promo.h"
74 #include "chrome/browser/sync/sync_prefs.h" 74 #include "chrome/browser/sync/sync_prefs.h"
75 #include "chrome/browser/task_manager/task_manager.h" 75 #include "chrome/browser/task_manager/task_manager.h"
76 #include "chrome/browser/translate/translate_prefs.h"
77 #include "chrome/browser/ui/alternate_error_tab_observer.h" 76 #include "chrome/browser/ui/alternate_error_tab_observer.h"
78 #include "chrome/browser/ui/app_list/app_list_service.h" 77 #include "chrome/browser/ui/app_list/app_list_service.h"
79 #include "chrome/browser/ui/browser_ui_prefs.h" 78 #include "chrome/browser/ui/browser_ui_prefs.h"
80 #include "chrome/browser/ui/network_profile_bubble.h" 79 #include "chrome/browser/ui/network_profile_bubble.h"
81 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 80 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
82 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" 81 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
83 #include "chrome/browser/ui/startup/autolaunch_prompt.h" 82 #include "chrome/browser/ui/startup/autolaunch_prompt.h"
84 #include "chrome/browser/ui/startup/default_browser_prompt.h" 83 #include "chrome/browser/ui/startup/default_browser_prompt.h"
85 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 84 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
86 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" 85 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
87 #include "chrome/browser/ui/webui/flags_ui.h" 86 #include "chrome/browser/ui/webui/flags_ui.h"
88 #include "chrome/browser/ui/webui/instant_ui.h" 87 #include "chrome/browser/ui/webui/instant_ui.h"
89 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 88 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
90 #include "chrome/browser/ui/webui/plugins_ui.h" 89 #include "chrome/browser/ui/webui/plugins_ui.h"
91 #include "chrome/browser/ui/webui/print_preview/sticky_settings.h" 90 #include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
92 #include "chrome/browser/upgrade_detector.h" 91 #include "chrome/browser/upgrade_detector.h"
93 #include "chrome/browser/web_resource/promo_resource_service.h" 92 #include "chrome/browser/web_resource/promo_resource_service.h"
94 #include "chrome/common/metrics/caching_permuted_entropy_provider.h" 93 #include "chrome/common/metrics/caching_permuted_entropy_provider.h"
95 #include "chrome/common/pref_names.h" 94 #include "chrome/common/pref_names.h"
96 #include "components/autofill/core/browser/autofill_manager.h" 95 #include "components/autofill/core/browser/autofill_manager.h"
96 #include "components/translate/core/browser/translate_prefs.h"
97 #include "components/user_prefs/pref_registry_syncable.h" 97 #include "components/user_prefs/pref_registry_syncable.h"
98 #include "content/public/browser/render_process_host.h" 98 #include "content/public/browser/render_process_host.h"
99 #include "extensions/browser/extension_prefs.h" 99 #include "extensions/browser/extension_prefs.h"
100 100
101 #if defined(ENABLE_AUTOFILL_DIALOG) 101 #if defined(ENABLE_AUTOFILL_DIALOG)
102 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 102 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
103 #endif 103 #endif
104 104
105 #if defined(ENABLE_CONFIGURATION_POLICY) 105 #if defined(ENABLE_CONFIGURATION_POLICY)
106 #include "components/policy/core/browser/browser_policy_connector.h" 106 #include "components/policy/core/browser/browser_policy_connector.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // Cleanup prefs from now-removed protector feature. 502 // Cleanup prefs from now-removed protector feature.
503 prefs->ClearPref(kBackupPref); 503 prefs->ClearPref(kBackupPref);
504 504
505 #if !defined(OS_ANDROID) 505 #if !defined(OS_ANDROID)
506 // Cleanup now-removed sync promo error message preference. 506 // Cleanup now-removed sync promo error message preference.
507 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442). 507 // TODO(fdoray): Remove this when it's safe to do so (crbug.com/268442).
508 prefs->ClearPref(kSyncPromoErrorMessage); 508 prefs->ClearPref(kSyncPromoErrorMessage);
509 #endif 509 #endif
510 510
511 PromoResourceService::MigrateUserPrefs(prefs); 511 PromoResourceService::MigrateUserPrefs(prefs);
512 TranslatePrefs::MigrateUserPrefs(prefs); 512 TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages);
513 513
514 #if defined(ENABLE_MANAGED_USERS) 514 #if defined(ENABLE_MANAGED_USERS)
515 ManagedUserService::MigrateUserPrefs(prefs); 515 ManagedUserService::MigrateUserPrefs(prefs);
516 #endif 516 #endif
517 } 517 }
518 518
519 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) { 519 void MigrateBrowserPrefs(Profile* profile, PrefService* local_state) {
520 // Copy pref values which have been migrated to user_prefs from local_state, 520 // Copy pref values which have been migrated to user_prefs from local_state,
521 // or remove them from local_state outright, if copying is not required. 521 // or remove them from local_state outright, if copying is not required.
522 int current_version = 522 int current_version =
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 575 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
576 current_version); 576 current_version);
577 } 577 }
578 578
579 #if defined(OS_CHROMEOS) 579 #if defined(OS_CHROMEOS)
580 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); 580 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state);
581 #endif 581 #endif
582 } 582 }
583 583
584 } // namespace chrome 584 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/migration_test.cc » ('j') | components/translate.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698