Index: chrome/browser/favicon/favicon_service.cc |
diff --git a/chrome/browser/favicon/favicon_service.cc b/chrome/browser/favicon/favicon_service.cc |
index f32b61e3bdb5b80471a9f6c26f9f61019cdbcff0..7707f5aa5ff70c8bb98eaf14a34a1cfc9ce97fea 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/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()); |
+ 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); |
} |
+ |