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

Unified Diff: chrome/browser/favicon/favicon_service.h

Issue 14322023: Don't request missing favicon on every page request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Propagate HTTP Status Code to FaviconTabHelper::DidDownloadFavicon, Clear Missing Favicons on RELOA… Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_service.cc » ('j') | chrome/browser/favicon/favicon_service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_service.h
diff --git a/chrome/browser/favicon/favicon_service.h b/chrome/browser/favicon/favicon_service.h
index 12ad68834af2e8c2b0c41d159564fd19ade4bf12..da4e8da2050bad4a4158db596d86591ec6ff317e 100644
--- a/chrome/browser/favicon/favicon_service.h
+++ b/chrome/browser/favicon/favicon_service.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/callback.h"
+#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/common/cancelable_request.h"
#include "chrome/browser/history/history_types.h"
@@ -223,7 +224,14 @@ class FaviconService : public CancelableRequestProvider,
history::IconType icon_type,
const gfx::Image& image);
+ // Avoid repeated requests to download missing favicon (crbug.com/39402).
sky 2013/05/03 20:24:54 Nuke crbug reference.
mef 2013/05/03 21:45:59 Done.
+ void AddMissingFavicon(const GURL& icon_url);
sky 2013/05/03 20:24:54 The names here are mildly confusing. How about: Un
mef 2013/05/03 21:45:59 Done.
+ bool IsMissingFavicon(const GURL& icon_url) const;
+ void ClearMissingFavicons();
+
private:
+ typedef uint32 MissingFaviconURLHash;
+ base::hash_set<MissingFaviconURLHash> missing_favicon_urls_;
HistoryService* history_service_;
// Helper function for GetFaviconImageForURL(), GetRawFaviconForURL() and
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_service.cc » ('j') | chrome/browser/favicon/favicon_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698