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

Side by Side Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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/extensions/extension_web_ui.h" 5 #include "chrome/browser/extensions/extension_web_ui.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 gfx::NativeView ExtensionWebUI::GetNativeViewOfHost() { 233 gfx::NativeView ExtensionWebUI::GetNativeViewOfHost() {
234 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); 234 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
235 return rwhv ? rwhv->GetNativeView() : NULL; 235 return rwhv ? rwhv->GetNativeView() : NULL;
236 } 236 }
237 237
238 //////////////////////////////////////////////////////////////////////////////// 238 ////////////////////////////////////////////////////////////////////////////////
239 // chrome:// URL overrides 239 // chrome:// URL overrides
240 240
241 // static 241 // static
242 void ExtensionWebUI::RegisterUserPrefs(PrefService* prefs) { 242 void ExtensionWebUI::RegisterUserPrefs(PrefService* prefs) {
243 prefs->RegisterDictionaryPref(kExtensionURLOverrides); 243 prefs->RegisterDictionaryPref(kExtensionURLOverrides,
244 PrefService::UNSYNCABLE_PREF);
244 } 245 }
245 246
246 // static 247 // static
247 bool ExtensionWebUI::HandleChromeURLOverride(GURL* url, Profile* profile) { 248 bool ExtensionWebUI::HandleChromeURLOverride(GURL* url, Profile* profile) {
248 if (!url->SchemeIs(chrome::kChromeUIScheme)) 249 if (!url->SchemeIs(chrome::kChromeUIScheme))
249 return false; 250 return false;
250 251
251 const DictionaryValue* overrides = 252 const DictionaryValue* overrides =
252 profile->GetPrefs()->GetDictionary(kExtensionURLOverrides); 253 profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
253 std::string page = url->host(); 254 std::string page = url->host();
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 450 }
450 451
451 // static 452 // static
452 void ExtensionWebUI::GetFaviconForURL(Profile* profile, 453 void ExtensionWebUI::GetFaviconForURL(Profile* profile,
453 FaviconService::GetFaviconRequest* request, const GURL& page_url) { 454 FaviconService::GetFaviconRequest* request, const GURL& page_url) {
454 // tracker deletes itself when done. 455 // tracker deletes itself when done.
455 ExtensionWebUIImageLoadingTracker* tracker = 456 ExtensionWebUIImageLoadingTracker* tracker =
456 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); 457 new ExtensionWebUIImageLoadingTracker(profile, request, page_url);
457 tracker->Init(); 458 tracker->Init();
458 } 459 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698