Index: chrome/browser/favicon/favicon_tab_helper.cc |
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc |
index 768e950c9c49e1377436549f26eee8530ec9dd0a..17e4f4a6e2a31fc6990ba25e1e72d1da9baab41d 100644 |
--- a/chrome/browser/favicon/favicon_tab_helper.cc |
+++ b/chrome/browser/favicon/favicon_tab_helper.cc |
@@ -135,6 +135,13 @@ NavigationEntry* FaviconTabHelper::GetActiveEntry() { |
} |
int FaviconTabHelper::StartDownload(const GURL& url, int image_size) { |
+ FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
+ profile_->GetOriginalProfile(), Profile::IMPLICIT_ACCESS); |
+ if (favicon_service && favicon_service->IsMissingFavicon(url)) { |
+ VLOG(1) << "Skip Missing FavIcon: " << url; |
+ return 0; |
+ } |
+ |
return web_contents()->DownloadImage( |
url, |
true, |
@@ -182,6 +189,15 @@ void FaviconTabHelper::DidDownloadFavicon( |
const GURL& image_url, |
int requested_size, |
const std::vector<SkBitmap>& bitmaps) { |
+ |
+ if (bitmaps.size() == 0) { |
sky
2013/05/01 14:00:07
Under what circumstances should we be doing this?
mef
2013/05/01 15:20:15
My (possibly incorrect) understanding is that bitm
|
+ VLOG(1) << "Missing Favicon:" << image_url; |
+ FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
+ profile_->GetOriginalProfile(), Profile::IMPLICIT_ACCESS); |
+ if (favicon_service) |
+ favicon_service->AddMissingFavicon(image_url); |
+ } |
+ |
favicon_handler_->OnDidDownloadFavicon( |
id, image_url, requested_size, bitmaps); |
if (touch_icon_handler_.get()) { |