Index: chrome/browser/ui/webui/favicon_source.cc |
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc |
index a4e085f1687952266478a268f307b92edd4a26f4..06ed5d457c4ce3fe0d7082d51f434876c262a3ec 100644 |
--- a/chrome/browser/ui/webui/favicon_source.cc |
+++ b/chrome/browser/ui/webui/favicon_source.cc |
@@ -10,9 +10,12 @@ |
#include "grit/app_resources.h" |
#include "ui/base/resource/resource_bundle.h" |
-FaviconSource::FaviconSource(Profile* profile) |
- : DataSource(chrome::kChromeUIFaviconHost, MessageLoop::current()), |
- profile_(profile->GetOriginalProfile()) { |
+FaviconSource::FaviconSource(Profile* profile, const std::string& favicon_host) |
+ : DataSource(favicon_host, MessageLoop::current()), |
+ profile_(profile->GetOriginalProfile()), |
+ icon_types_(favicon_host.compare(chrome::kChromeUIFaviconHost) == 0 ? |
+ history::FAVICON : |
+ history::TOUCH_PRECOMPOSED_ICON | history::TOUCH_ICON) { |
} |
FaviconSource::~FaviconSource() { |
@@ -31,6 +34,7 @@ void FaviconSource::StartDataRequest(const std::string& path, |
} |
if (path.size() > 8 && path.substr(0, 8) == "iconurl/") { |
+ // TODO : Change GetFavicon to support combination of IconType. |
handle = favicon_service->GetFavicon( |
GURL(path.substr(8)), |
history::FAVICON, |
@@ -39,7 +43,7 @@ void FaviconSource::StartDataRequest(const std::string& path, |
} else { |
handle = favicon_service->GetFaviconForURL( |
GURL(path), |
- history::FAVICON, |
+ icon_types_, |
&cancelable_consumer_, |
NewCallback(this, &FaviconSource::OnFaviconDataAvailable)); |
} |