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