From 0189bc72c90fab03afab623d0b2d8be3d35af3e7 Mon Sep 17 00:00:00 2001 From: "arv@google.com" Date: Fri, 28 Aug 2009 21:56:48 +0000 Subject: Adds a FaviconService class tied to the profile. Original issue: http://codereview.chromium.org/115212/show The favicons service is the entry point to getting favicons. Make the DOMUIFactory handle the favicons of DOMUI pages so since DOMUI pages are never added to the history. BUG=5840 TEST=Open a new window and open history and downloads (Ctrl+H and Ctrl+J) in this window. Then close the window and open the NTP. The recently closed windows/tabs should show the favicons for the hsitroy and downloads page. Review URL: http://codereview.chromium.org/178001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24806 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/profile.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'chrome/browser/profile.h') diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h index 6ff28e8..36679a7 100644 --- a/chrome/browser/profile.h +++ b/chrome/browser/profile.h @@ -32,6 +32,7 @@ class ExtensionDevToolsManager; class ExtensionProcessManager; class ExtensionMessageService; class ExtensionsService; +class FaviconService; class HistoryService; class NavigationController; class PasswordStore; @@ -152,6 +153,19 @@ class Profile { // called. virtual net::ForceTLSState* GetForceTLSState() = 0; + // Retrieves a pointer to the FaviconService associated with this + // profile. The FaviconService is lazily created the first time + // that this method is called. + // + // Although FaviconService is refcounted, this will not addref, and callers + // do not need to do any reference counting as long as they keep the pointer + // only for the local scope (which they should do anyway since the browser + // process may decide to shut down). + // + // |access| defines what the caller plans to do with the service. See + // the ServiceAccessType definition above. + virtual FaviconService* GetFaviconService(ServiceAccessType access) = 0; + // Retrieves a pointer to the HistoryService associated with this // profile. The HistoryService is lazily created the first time // that this method is called. @@ -353,6 +367,7 @@ class ProfileImpl : public Profile, virtual ExtensionDevToolsManager* GetExtensionDevToolsManager(); virtual ExtensionProcessManager* GetExtensionProcessManager(); virtual ExtensionMessageService* GetExtensionMessageService(); + virtual FaviconService* GetFaviconService(ServiceAccessType sat); virtual HistoryService* GetHistoryService(ServiceAccessType sat); virtual WebDataService* GetWebDataService(ServiceAccessType sat); virtual PasswordStore* GetPasswordStore(ServiceAccessType sat); @@ -461,12 +476,14 @@ class ProfileImpl : public Profile, scoped_refptr download_manager_; scoped_refptr history_service_; + scoped_refptr favicon_service_; scoped_refptr web_data_service_; scoped_refptr password_store_; scoped_refptr session_service_; scoped_refptr theme_provider_; scoped_refptr webkit_context_; bool history_service_created_; + bool favicon_service_created_; bool created_web_data_service_; bool created_password_store_; bool created_download_manager_; -- cgit v1.1