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

Unified Diff: android_webview/browser/icon_helper.h

Issue 255503004: Do not attempt to download favicons with 404 status in WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | android_webview/browser/icon_helper.cc » ('j') | android_webview/browser/icon_helper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/icon_helper.h
diff --git a/android_webview/browser/icon_helper.h b/android_webview/browser/icon_helper.h
index d96406358472ecee5ef0987b8a2c742846a17642..13caefe1167943777299340c4063de58c959f969 100644
--- a/android_webview/browser/icon_helper.h
+++ b/android_webview/browser/icon_helper.h
@@ -6,6 +6,7 @@
#define ANDROID_WEBVIEW_BROWSER_ICON_HELPER_H_
#include <string>
+#include "base/containers/hash_tables.h"
#include "content/public/browser/web_contents_observer.h"
#include "url/gurl.h"
@@ -43,6 +44,9 @@ class IconHelper : public content::WebContentsObserver {
// From WebContentsObserver
virtual void DidUpdateFaviconURL(int32 page_id,
const std::vector<content::FaviconURL>& candidates) OVERRIDE;
+ virtual void DidStartNavigationToPendingEntry(
+ const GURL& url,
+ content::NavigationController::ReloadType reload_type) OVERRIDE;
void DownloadFaviconCallback(
int id,
@@ -52,8 +56,15 @@ class IconHelper : public content::WebContentsObserver {
const std::vector<gfx::Size>& original_bitmap_sizes);
private:
+ void MarkUnableToDownloadFavicon(const GURL& icon_url);
+ bool WasUnableToDownloadFavicon(const GURL& icon_url) const;
+ void ClearUnableToDownloadFavicons();
+
Listener* listener_;
+ typedef uint32 MissingFaviconURLHash;
+ base::hash_set<MissingFaviconURLHash> missing_favicon_urls_;
+
DISALLOW_COPY_AND_ASSIGN(IconHelper);
};
« no previous file with comments | « no previous file | android_webview/browser/icon_helper.cc » ('j') | android_webview/browser/icon_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698