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

Unified Diff: chrome/browser/ui/webui/favicon_source.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style issues Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
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));
}

Powered by Google App Engine
This is Rietveld 408576698