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

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

Issue 6410115: Adds navigator.registerProtocolHandler. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Sync'd, disallow non-same origin rph, adds hostname to the infobar. Created 9 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 | Annotate | Revision Log
OLDNEW
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_contents_service.h" 9 #include "chrome/browser/background_contents_service.h"
10 #include "chrome/browser/background_mode_manager.h" 10 #include "chrome/browser/background_mode_manager.h"
11 #include "chrome/browser/background_page_tracker.h" 11 #include "chrome/browser/background_page_tracker.h"
12 #include "chrome/browser/bookmarks/bookmark_utils.h" 12 #include "chrome/browser/bookmarks/bookmark_utils.h"
13 #include "chrome/browser/browser_shutdown.h" 13 #include "chrome/browser/browser_shutdown.h"
14 #include "chrome/browser/content_settings/host_content_settings_map.h" 14 #include "chrome/browser/content_settings/host_content_settings_map.h"
15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
15 #include "chrome/browser/debugger/devtools_manager.h" 16 #include "chrome/browser/debugger/devtools_manager.h"
16 #include "chrome/browser/dom_ui/new_tab_ui.h" 17 #include "chrome/browser/dom_ui/new_tab_ui.h"
17 #include "chrome/browser/download/download_prefs.h" 18 #include "chrome/browser/download/download_prefs.h"
18 #include "chrome/browser/extensions/extension_prefs.h" 19 #include "chrome/browser/extensions/extension_prefs.h"
19 #include "chrome/browser/extensions/extension_web_ui.h" 20 #include "chrome/browser/extensions/extension_web_ui.h"
20 #include "chrome/browser/extensions/extensions_ui.h" 21 #include "chrome/browser/extensions/extensions_ui.h"
21 #include "chrome/browser/external_protocol_handler.h" 22 #include "chrome/browser/external_protocol_handler.h"
22 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 23 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
23 #include "chrome/browser/geolocation/geolocation_prefs.h" 24 #include "chrome/browser/geolocation/geolocation_prefs.h"
24 #include "chrome/browser/google/google_url_tracker.h" 25 #include "chrome/browser/google/google_url_tracker.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #endif 148 #endif
148 #if defined(OS_CHROMEOS) 149 #if defined(OS_CHROMEOS)
149 chromeos::Preferences::RegisterUserPrefs(user_prefs); 150 chromeos::Preferences::RegisterUserPrefs(user_prefs);
150 #endif 151 #endif
151 BackgroundContentsService::RegisterUserPrefs(user_prefs); 152 BackgroundContentsService::RegisterUserPrefs(user_prefs);
152 SigninManager::RegisterUserPrefs(user_prefs); 153 SigninManager::RegisterUserPrefs(user_prefs);
153 TemplateURLModel::RegisterUserPrefs(user_prefs); 154 TemplateURLModel::RegisterUserPrefs(user_prefs);
154 InstantController::RegisterUserPrefs(user_prefs); 155 InstantController::RegisterUserPrefs(user_prefs);
155 NetPrefObserver::RegisterPrefs(user_prefs); 156 NetPrefObserver::RegisterPrefs(user_prefs);
156 policy::ProfilePolicyContext::RegisterUserPrefs(user_prefs); 157 policy::ProfilePolicyContext::RegisterUserPrefs(user_prefs);
158 ProtocolHandlerRegistry::RegisterPrefs(user_prefs);
157 } 159 }
158 160
159 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { 161 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) {
160 // Copy pref values which have been migrated to user_prefs from local_state, 162 // Copy pref values which have been migrated to user_prefs from local_state,
161 // or remove them from local_state outright, if copying is not required. 163 // or remove them from local_state outright, if copying is not required.
162 int current_version = 164 int current_version =
163 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); 165 local_state->GetInteger(prefs::kMultipleProfilePrefMigration);
164 166
165 if ((current_version & WINDOWS_PREFS) == 0) { 167 if ((current_version & WINDOWS_PREFS) == 0) {
166 // Migrate the devtools split location preference. 168 // Migrate the devtools split location preference.
(...skipping 14 matching lines...) Expand all
181 GetValue())); 183 GetValue()));
182 } 184 }
183 local_state->ClearPref(prefs::kBrowserWindowPlacement); 185 local_state->ClearPref(prefs::kBrowserWindowPlacement);
184 186
185 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 187 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
186 current_version | WINDOWS_PREFS); 188 current_version | WINDOWS_PREFS);
187 } 189 }
188 } 190 }
189 191
190 } // namespace browser 192 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698