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

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

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 3 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_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_tab_helper.h
diff --git a/chrome/browser/favicon/favicon_tab_helper.h b/chrome/browser/favicon/favicon_tab_helper.h
index d1d3465a8cfc7d4caec52505c662c85489f490dc..dcd285a5eabf18a1c10a1cf26909c78be32fb82e 100644
--- a/chrome/browser/favicon/favicon_tab_helper.h
+++ b/chrome/browser/favicon/favicon_tab_helper.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
+#include "chrome/browser/common/web_contents_user_data.h"
#include "chrome/browser/favicon/favicon_handler_delegate.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/common/favicon_url.h"
@@ -33,9 +34,9 @@ class SkBitmap;
// callback.
//
class FaviconTabHelper : public content::WebContentsObserver,
- public FaviconHandlerDelegate {
+ public FaviconHandlerDelegate,
+ public WebContentsUserData<FaviconTabHelper> {
public:
- explicit FaviconTabHelper(content::WebContents* web_contents);
virtual ~FaviconTabHelper();
// Initiates loading the favicon for the specified url.
@@ -82,6 +83,9 @@ class FaviconTabHelper : public content::WebContentsObserver,
virtual void NotifyFaviconUpdated() OVERRIDE;
private:
+ explicit FaviconTabHelper(content::WebContents* web_contents);
+ friend class WebContentsUserData<FaviconTabHelper>;
+
// content::WebContentsObserver overrides.
virtual void NavigateToPendingEntry(
const GURL& url,
« no previous file with comments | « no previous file | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698