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

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: Fix syncing of platform specific prefs Created 9 years, 8 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 gfx::NativeView ExtensionWebUI::GetNativeViewOfHost() { 226 gfx::NativeView ExtensionWebUI::GetNativeViewOfHost() {
227 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView(); 227 RenderWidgetHostView* rwhv = tab_contents()->GetRenderWidgetHostView();
228 return rwhv ? rwhv->GetNativeView() : NULL; 228 return rwhv ? rwhv->GetNativeView() : NULL;
229 } 229 }
230 230
231 //////////////////////////////////////////////////////////////////////////////// 231 ////////////////////////////////////////////////////////////////////////////////
232 // chrome:// URL overrides 232 // chrome:// URL overrides
233 233
234 // static 234 // static
235 void ExtensionWebUI::RegisterUserPrefs(PrefService* prefs) { 235 void ExtensionWebUI::RegisterUserPrefs(PrefService* prefs) {
236 prefs->RegisterDictionaryPref(kExtensionURLOverrides); 236 prefs->RegisterDictionaryPref(kExtensionURLOverrides,
237 false /* don't sync pref */);
237 } 238 }
238 239
239 // static 240 // static
240 bool ExtensionWebUI::HandleChromeURLOverride(GURL* url, Profile* profile) { 241 bool ExtensionWebUI::HandleChromeURLOverride(GURL* url, Profile* profile) {
241 if (!url->SchemeIs(chrome::kChromeUIScheme)) 242 if (!url->SchemeIs(chrome::kChromeUIScheme))
242 return false; 243 return false;
243 244
244 const DictionaryValue* overrides = 245 const DictionaryValue* overrides =
245 profile->GetPrefs()->GetDictionary(kExtensionURLOverrides); 246 profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
246 std::string page = url->host(); 247 std::string page = url->host();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 407 }
407 408
408 // static 409 // static
409 void ExtensionWebUI::GetFaviconForURL(Profile* profile, 410 void ExtensionWebUI::GetFaviconForURL(Profile* profile,
410 FaviconService::GetFaviconRequest* request, const GURL& page_url) { 411 FaviconService::GetFaviconRequest* request, const GURL& page_url) {
411 // tracker deletes itself when done. 412 // tracker deletes itself when done.
412 ExtensionWebUIImageLoadingTracker* tracker = 413 ExtensionWebUIImageLoadingTracker* tracker =
413 new ExtensionWebUIImageLoadingTracker(profile, request, page_url); 414 new ExtensionWebUIImageLoadingTracker(profile, request, page_url);
414 tracker->Init(); 415 tracker->Init();
415 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698