OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/about_flags.h" | 7 #include "chrome/browser/about_flags.h" |
8 #include "chrome/browser/autofill/autofill_manager.h" | 8 #include "chrome/browser/autofill/autofill_manager.h" |
9 #include "chrome/browser/background/background_contents_service.h" | 9 #include "chrome/browser/background/background_contents_service.h" |
10 #include "chrome/browser/background/background_mode_manager.h" | 10 #include "chrome/browser/background/background_mode_manager.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "chrome/browser/ui/webui/flags_ui.h" | 59 #include "chrome/browser/ui/webui/flags_ui.h" |
60 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 60 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
61 #include "chrome/browser/ui/webui/plugins_ui.h" | 61 #include "chrome/browser/ui/webui/plugins_ui.h" |
62 #include "chrome/browser/upgrade_detector.h" | 62 #include "chrome/browser/upgrade_detector.h" |
63 #include "chrome/browser/web_resource/promo_resource_service.h" | 63 #include "chrome/browser/web_resource/promo_resource_service.h" |
64 #include "chrome/common/pref_names.h" | 64 #include "chrome/common/pref_names.h" |
65 #include "content/browser/host_zoom_map.h" | 65 #include "content/browser/host_zoom_map.h" |
66 #include "content/browser/renderer_host/browser_render_process_host.h" | 66 #include "content/browser/renderer_host/browser_render_process_host.h" |
67 #include "content/browser/ssl/ssl_manager.h" | 67 #include "content/browser/ssl/ssl_manager.h" |
68 | 68 |
| 69 #if defined(OS_MACOSX) |
| 70 #include "chrome/browser/ui/cocoa/presentation_mode_prefs.h" |
| 71 #endif |
| 72 |
69 #if defined(TOOLKIT_VIEWS) // TODO(port): whittle this down as we port | 73 #if defined(TOOLKIT_VIEWS) // TODO(port): whittle this down as we port |
70 #include "chrome/browser/ui/views/browser_actions_container.h" | 74 #include "chrome/browser/ui/views/browser_actions_container.h" |
71 #include "chrome/browser/ui/views/frame/browser_view.h" | 75 #include "chrome/browser/ui/views/frame/browser_view.h" |
72 #endif | 76 #endif |
73 | 77 |
74 #if defined(TOOLKIT_GTK) | 78 #if defined(TOOLKIT_GTK) |
75 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 79 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
76 #endif | 80 #endif |
77 | 81 |
78 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
173 chromeos::Preferences::RegisterUserPrefs(user_prefs); | 177 chromeos::Preferences::RegisterUserPrefs(user_prefs); |
174 #endif | 178 #endif |
175 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 179 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
176 SigninManager::RegisterUserPrefs(user_prefs); | 180 SigninManager::RegisterUserPrefs(user_prefs); |
177 TemplateURLService::RegisterUserPrefs(user_prefs); | 181 TemplateURLService::RegisterUserPrefs(user_prefs); |
178 InstantController::RegisterUserPrefs(user_prefs); | 182 InstantController::RegisterUserPrefs(user_prefs); |
179 NetPrefObserver::RegisterPrefs(user_prefs); | 183 NetPrefObserver::RegisterPrefs(user_prefs); |
180 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); | 184 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); |
181 FirewallTraversalTabHelper::RegisterUserPrefs(user_prefs); | 185 FirewallTraversalTabHelper::RegisterUserPrefs(user_prefs); |
| 186 #if defined(OS_MACOSX) |
| 187 PresentationModePrefs::RegisterUserPrefs(user_prefs); |
| 188 #endif |
182 } | 189 } |
183 | 190 |
184 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 191 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
185 // Copy pref values which have been migrated to user_prefs from local_state, | 192 // Copy pref values which have been migrated to user_prefs from local_state, |
186 // or remove them from local_state outright, if copying is not required. | 193 // or remove them from local_state outright, if copying is not required. |
187 int current_version = | 194 int current_version = |
188 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 195 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
189 | 196 |
190 if ((current_version & WINDOWS_PREFS) == 0) { | 197 if ((current_version & WINDOWS_PREFS) == 0) { |
191 // Migrate the devtools split location preference. | 198 // Migrate the devtools split location preference. |
(...skipping 15 matching lines...) Expand all Loading... |
207 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 214 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
208 } | 215 } |
209 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 216 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
210 | 217 |
211 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 218 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
212 current_version | WINDOWS_PREFS); | 219 current_version | WINDOWS_PREFS); |
213 } | 220 } |
214 } | 221 } |
215 | 222 |
216 } // namespace browser | 223 } // namespace browser |
OLD | NEW |