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

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

Issue 10857037: Make FaviconService a ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the tests Created 8 years, 4 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 d122dd64bda74871cb4e9e8cf22ba3a6be1dfeb4..77dd0d4cda9ffb9fa4bb68178b1dffcd7898e563 100644
--- a/chrome/browser/favicon/favicon_service.h
+++ b/chrome/browser/favicon/favicon_service.h
@@ -11,9 +11,11 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/common/ref_counted_util.h"
class GURL;
+class HistoryService;
class Profile;
// The favicon service provides methods to access favicons. It calls the history
@@ -21,9 +23,14 @@ class Profile;
//
// This service is thread safe. Each request callback is invoked in the
// thread that made the request.
-class FaviconService : public CancelableRequestProvider {
+class FaviconService : public CancelableRequestProvider,
+ public ProfileKeyedService {
public:
- explicit FaviconService(Profile* profile);
+ // FIXME: We should not take a Profile pointer here.
+ // We do this now because we need to pass a Profile pointer to
+ // ChromeWebUIControllerFactory::GetFaviconForURL() until that
+ // component gets untangled too.
+ FaviconService(scoped_refptr<HistoryService>, Profile*);
virtual ~FaviconService();
@@ -103,10 +110,10 @@ class FaviconService : public CancelableRequestProvider {
const GURL& icon_url,
const std::vector<unsigned char>& image_data,
history::IconType icon_type);
-
private:
+ scoped_refptr<HistoryService> history_service_;
+ // FIXME: remove this member variable. See comment in the constructor.
Profile* profile_;
-
// Helper to forward an empty result if we cannot get the history service.
void ForwardEmptyResultAsync(GetFaviconRequest* request);
« 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