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..fb5a8bce981fdef139fc571999f668a98fe08253 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" |
@@ -353,3 +354,19 @@ void FaviconService::RunFaviconRawCallbackWithBitmapResults( |
&resized_bitmap_data); |
callback.Run(bitmap_result); |
} |
+ |
+void FaviconService::AddMissingFavicon(const GURL& icon_url) { |
sky
2013/05/03 20:24:54
Order should match header.
mef
2013/05/03 21:45:59
Done.
|
+ MissingFaviconURLHash url_hash = base::Hash(icon_url.spec()); |
sky
2013/05/03 20:24:54
How likely are we to get false collisions?
mef
2013/05/03 21:45:59
With ideal Hash it should be 1/2**32 ~ 25*(10**-11
|
+ missing_favicon_urls_.insert(url_hash); |
+} |
+ |
+bool FaviconService::IsMissingFavicon(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::ClearMissingFavicons() { |
+ missing_favicon_urls_.clear(); |
+} |
+ |
sky
2013/05/03 20:24:54
nit: nuke newlines.
mef
2013/05/03 21:45:59
Done.
|
+ |