| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 ExtensionWebUI::bookmark_manager_private_drag_event_router() { | 180 ExtensionWebUI::bookmark_manager_private_drag_event_router() { |
| 181 return bookmark_manager_private_drag_event_router_.get(); | 181 return bookmark_manager_private_drag_event_router_.get(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 //////////////////////////////////////////////////////////////////////////////// | 184 //////////////////////////////////////////////////////////////////////////////// |
| 185 // chrome:// URL overrides | 185 // chrome:// URL overrides |
| 186 | 186 |
| 187 // static | 187 // static |
| 188 void ExtensionWebUI::RegisterProfilePrefs( | 188 void ExtensionWebUI::RegisterProfilePrefs( |
| 189 user_prefs::PrefRegistrySyncable* registry) { | 189 user_prefs::PrefRegistrySyncable* registry) { |
| 190 registry->RegisterDictionaryPref( | 190 registry->RegisterDictionaryPref(kExtensionURLOverrides); |
| 191 kExtensionURLOverrides, | |
| 192 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 193 } | 191 } |
| 194 | 192 |
| 195 // static | 193 // static |
| 196 bool ExtensionWebUI::HandleChromeURLOverride( | 194 bool ExtensionWebUI::HandleChromeURLOverride( |
| 197 GURL* url, | 195 GURL* url, |
| 198 content::BrowserContext* browser_context) { | 196 content::BrowserContext* browser_context) { |
| 199 if (!url->SchemeIs(content::kChromeUIScheme)) | 197 if (!url->SchemeIs(content::kChromeUIScheme)) |
| 200 return false; | 198 return false; |
| 201 | 199 |
| 202 Profile* profile = Profile::FromBrowserContext(browser_context); | 200 Profile* profile = Profile::FromBrowserContext(browser_context); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, | 430 extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, |
| 433 gfx::Size(pixel_size, pixel_size), | 431 gfx::Size(pixel_size, pixel_size), |
| 434 resource_scale_factor)); | 432 resource_scale_factor)); |
| 435 } | 433 } |
| 436 | 434 |
| 437 // LoadImagesAsync actually can run callback synchronously. We want to force | 435 // LoadImagesAsync actually can run callback synchronously. We want to force |
| 438 // async. | 436 // async. |
| 439 extensions::ImageLoader::Get(profile)->LoadImagesAsync( | 437 extensions::ImageLoader::Get(profile)->LoadImagesAsync( |
| 440 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); | 438 extension, info_list, base::Bind(&RunFaviconCallbackAsync, callback)); |
| 441 } | 439 } |
| OLD | NEW |