| 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 "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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 #include "chrome/browser/ui/cocoa/confirm_quit.h" | 174 #include "chrome/browser/ui/cocoa/confirm_quit.h" |
| 175 #include "chrome/browser/ui/cocoa/extensions/browser_actions_controller_prefs.h" | 175 #include "chrome/browser/ui/cocoa/extensions/browser_actions_controller_prefs.h" |
| 176 #endif | 176 #endif |
| 177 | 177 |
| 178 #if defined(OS_WIN) | 178 #if defined(OS_WIN) |
| 179 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" | 179 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" |
| 180 #endif | 180 #endif |
| 181 | 181 |
| 182 #if defined(TOOLKIT_VIEWS) | 182 #if defined(TOOLKIT_VIEWS) |
| 183 #include "chrome/browser/ui/browser_view_prefs.h" | 183 #include "chrome/browser/ui/browser_view_prefs.h" |
| 184 #include "chrome/browser/ui/tabs/tab_strip_layout_type_prefs.h" | |
| 185 #endif | 184 #endif |
| 186 | 185 |
| 187 #if defined(USE_ASH) | 186 #if defined(USE_ASH) |
| 188 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" | 187 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" |
| 189 #endif | 188 #endif |
| 190 | 189 |
| 191 namespace { | 190 namespace { |
| 192 | 191 |
| 193 enum MigratedPreferences { | 192 enum MigratedPreferences { |
| 194 NO_PREFS = 0, | 193 NO_PREFS = 0, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 QuitWithAppsController::RegisterPrefs(registry); | 316 QuitWithAppsController::RegisterPrefs(registry); |
| 318 #endif | 317 #endif |
| 319 | 318 |
| 320 #if defined(OS_WIN) | 319 #if defined(OS_WIN) |
| 321 app_metro_launch::RegisterPrefs(registry); | 320 app_metro_launch::RegisterPrefs(registry); |
| 322 password_manager::PasswordManager::RegisterLocalPrefs(registry); | 321 password_manager::PasswordManager::RegisterLocalPrefs(registry); |
| 323 #endif | 322 #endif |
| 324 | 323 |
| 325 #if defined(TOOLKIT_VIEWS) | 324 #if defined(TOOLKIT_VIEWS) |
| 326 RegisterBrowserViewLocalPrefs(registry); | 325 RegisterBrowserViewLocalPrefs(registry); |
| 327 RegisterTabStripLayoutTypePrefs(registry); | |
| 328 #endif | 326 #endif |
| 329 } | 327 } |
| 330 | 328 |
| 331 // Register prefs applicable to all profiles. | 329 // Register prefs applicable to all profiles. |
| 332 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 330 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 333 TRACE_EVENT0("browser", "chrome::RegisterUserPrefs"); | 331 TRACE_EVENT0("browser", "chrome::RegisterUserPrefs"); |
| 334 // User prefs. Please keep this list alphabetized. | 332 // User prefs. Please keep this list alphabetized. |
| 335 apps::RegisterProfilePrefs(registry); | 333 apps::RegisterProfilePrefs(registry); |
| 336 autofill::AutofillManager::RegisterProfilePrefs(registry); | 334 autofill::AutofillManager::RegisterProfilePrefs(registry); |
| 337 bookmark_utils::RegisterProfilePrefs(registry); | 335 bookmark_utils::RegisterProfilePrefs(registry); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 568 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
| 571 | 569 |
| 572 current_version |= GOOGLE_URL_TRACKER_PREFS; | 570 current_version |= GOOGLE_URL_TRACKER_PREFS; |
| 573 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 571 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 574 current_version); | 572 current_version); |
| 575 } | 573 } |
| 576 | 574 |
| 577 #if defined(OS_CHROMEOS) | 575 #if defined(OS_CHROMEOS) |
| 578 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); | 576 chromeos::default_pinned_apps_field_trial::MigratePrefs(local_state); |
| 579 #endif | 577 #endif |
| 578 |
| 579 #if defined(TOOLKIT_VIEWS) |
| 580 MigrateBrowserTabStripPrefs(local_state); |
| 581 #endif |
| 580 } | 582 } |
| 581 | 583 |
| 582 } // namespace chrome | 584 } // namespace chrome |
| OLD | NEW |