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/ui/webui/chrome_web_ui_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/about_flags.h" | 8 #include "chrome/browser/about_flags.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_web_ui.h" | 10 #include "chrome/browser/extensions/extension_web_ui.h" |
11 #include "chrome/browser/extensions/extensions_ui.h" | 11 #include "chrome/browser/extensions/extensions_ui.h" |
12 #include "chrome/browser/history/history_types.h" | |
12 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 14 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
14 #include "chrome/browser/ui/webui/bug_report_ui.h" | 15 #include "chrome/browser/ui/webui/bug_report_ui.h" |
15 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 16 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
16 #include "chrome/browser/ui/webui/crashes_ui.h" | 17 #include "chrome/browser/ui/webui/crashes_ui.h" |
17 #include "chrome/browser/ui/webui/devtools_ui.h" | 18 #include "chrome/browser/ui/webui/devtools_ui.h" |
18 #include "chrome/browser/ui/webui/downloads_ui.h" | 19 #include "chrome/browser/ui/webui/downloads_ui.h" |
19 #include "chrome/browser/ui/webui/flags_ui.h" | 20 #include "chrome/browser/ui/webui/flags_ui.h" |
20 #include "chrome/browser/ui/webui/flash_ui.h" | 21 #include "chrome/browser/ui/webui/flash_ui.h" |
21 #include "chrome/browser/ui/webui/gpu_internals_ui.h" | 22 #include "chrome/browser/ui/webui/gpu_internals_ui.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 // part of the manifest. | 280 // part of the manifest. |
280 if (page_url.SchemeIs(chrome::kExtensionScheme) && | 281 if (page_url.SchemeIs(chrome::kExtensionScheme) && |
281 page_url.host() != extension_misc::kBookmarkManagerId) { | 282 page_url.host() != extension_misc::kBookmarkManagerId) { |
282 ExtensionWebUI::GetFaviconForURL(profile, request, page_url); | 283 ExtensionWebUI::GetFaviconForURL(profile, request, page_url); |
283 } else { | 284 } else { |
284 history::FaviconData favicon; | 285 history::FaviconData favicon; |
285 favicon.image_data = scoped_refptr<RefCountedMemory>( | 286 favicon.image_data = scoped_refptr<RefCountedMemory>( |
286 GetFaviconResourceBytes(page_url)); | 287 GetFaviconResourceBytes(page_url)); |
287 favicon.known_icon = favicon.image_data.get() != NULL && | 288 favicon.known_icon = favicon.image_data.get() != NULL && |
288 favicon.image_data->size() > 0; | 289 favicon.image_data->size() > 0; |
290 favicon.icon_type = history::FAVICON; | |
michaelbai
2011/06/09 15:49:44
Would the issue be fixed by only adding this line?
Finnur
2011/06/09 16:01:57
Yes. The other two were found by searching. I gues
| |
289 request->ForwardResultAsync( | 291 request->ForwardResultAsync( |
290 FaviconService::FaviconDataCallback::TupleType(request->handle(), | 292 FaviconService::FaviconDataCallback::TupleType(request->handle(), |
291 favicon)); | 293 favicon)); |
292 } | 294 } |
293 } | 295 } |
294 | 296 |
295 // static | 297 // static |
296 ChromeWebUIFactory* ChromeWebUIFactory::GetInstance() { | 298 ChromeWebUIFactory* ChromeWebUIFactory::GetInstance() { |
297 return Singleton< ChromeWebUIFactory, PossibleTestSingletonTraits< | 299 return Singleton< ChromeWebUIFactory, PossibleTestSingletonTraits< |
298 ChromeWebUIFactory, TestChromeWebUIFactory> >::get(); | 300 ChromeWebUIFactory, TestChromeWebUIFactory> >::get(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 return FlashUI::GetFaviconResourceBytes(); | 349 return FlashUI::GetFaviconResourceBytes(); |
348 | 350 |
349 if (page_url.host() == chrome::kChromeUISettingsHost) | 351 if (page_url.host() == chrome::kChromeUISettingsHost) |
350 return OptionsUI::GetFaviconResourceBytes(); | 352 return OptionsUI::GetFaviconResourceBytes(); |
351 | 353 |
352 if (page_url.host() == chrome::kChromeUIPluginsHost) | 354 if (page_url.host() == chrome::kChromeUIPluginsHost) |
353 return PluginsUI::GetFaviconResourceBytes(); | 355 return PluginsUI::GetFaviconResourceBytes(); |
354 | 356 |
355 return NULL; | 357 return NULL; |
356 } | 358 } |
OLD | NEW |