Index: chrome/browser/favicon/favicon_service.cc |
diff --git a/chrome/browser/favicon/favicon_service.cc b/chrome/browser/favicon/favicon_service.cc |
index b762b19886e76adfb51da6044e1dc1c3cf85b05a..a60b63711c2901f55888c74177ae34b1b63e8e8a 100644 |
--- a/chrome/browser/favicon/favicon_service.cc |
+++ b/chrome/browser/favicon/favicon_service.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/favicon/favicon_service.h" |
+#include "base/hash.h" |
#include "base/message_loop_proxy.h" |
#include "chrome/browser/favicon/favicon_util.h" |
#include "chrome/browser/history/history_backend.h" |
@@ -259,6 +260,20 @@ void FaviconService::SetFavicons( |
history_service_->SetFavicons(page_url, icon_type, favicon_bitmap_data); |
} |
+void FaviconService::UnableToDownloadFavicon(const GURL& icon_url) { |
+ MissingFaviconURLHash url_hash = base::Hash(icon_url.spec()); |
palmer
2013/05/13 17:22:47
I don't think it matters a whole lot, but my insti
mef
2013/05/14 18:47:08
I thought about it, but hash_set seemed more natur
|
+ missing_favicon_urls_.insert(url_hash); |
+} |
+ |
+bool FaviconService::WasUnableToDownloadFavicon(const GURL& icon_url) const { |
+ MissingFaviconURLHash url_hash = base::Hash(icon_url.spec()); |
+ return missing_favicon_urls_.find(url_hash) != missing_favicon_urls_.end(); |
+} |
+ |
+void FaviconService::ClearUnableToDownloadFavicons() { |
+ missing_favicon_urls_.clear(); |
+} |
+ |
FaviconService::~FaviconService() {} |
CancelableTaskTracker::TaskId FaviconService::GetFaviconForURLImpl( |
@@ -353,3 +368,4 @@ void FaviconService::RunFaviconRawCallbackWithBitmapResults( |
&resized_bitmap_data); |
callback.Run(bitmap_result); |
} |
+ |