Index: chrome/browser/webdata/web_data_service_factory.h |
diff --git a/chrome/browser/webdata/web_data_service_factory.h b/chrome/browser/webdata/web_data_service_factory.h |
index fe4ef6b14b66421693ae3cdf9a9c678732276a79..9140fe65ab8dae9c498619c9a6d657fd1a7cee60 100644 |
--- a/chrome/browser/webdata/web_data_service_factory.h |
+++ b/chrome/browser/webdata/web_data_service_factory.h |
@@ -6,13 +6,37 @@ |
#define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
#include "base/memory/singleton.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h" |
+#include "chrome/browser/profiles/profile_keyed_service_factory.h" |
+#include "chrome/browser/webdata/web_data_service.h" |
+ |
+// A wrapper of WebDataService so that we can use it as a profile keyed service. |
+class WebDataServiceWrapper : public ProfileKeyedService { |
+ public: |
+ WebDataServiceWrapper(Profile* profile); |
+ |
+ // For testing. |
+ WebDataServiceWrapper() {}; |
+ |
+ virtual ~WebDataServiceWrapper(); |
+ |
+ // ProfileKeyedService: |
+ virtual void Shutdown() OVERRIDE; |
+ |
+ virtual scoped_refptr<WebDataService> GetWebData(); |
+ |
+ private: |
+ scoped_refptr<WebDataService> web_data_service_; |
+}; |
-class WebDataService; |
-class WebDataServiceFactory : public RefcountedProfileKeyedServiceFactory { |
+// Singleton that owns all PersonalDataManagers and associates them with |
Jói
2013/03/15 17:40:59
PersonalDataManager? (Here and three lines down).
Cait (Slow)
2013/03/17 18:50:57
Done.
|
+// Profiles. |
+// Listens for the Profile's destruction notification and cleans up the |
+// associated PersonalDataManager. |
+class WebDataServiceFactory : public ProfileKeyedServiceFactory { |
public: |
// Returns the |WebDataService| associated with the |profile|. |
// |access_type| is either EXPLICIT_ACCESS or IMPLICIT_ACCESS |
@@ -33,7 +57,7 @@ class WebDataServiceFactory : public RefcountedProfileKeyedServiceFactory { |
// |ProfileKeyedBaseFactory| methods: |
virtual bool ServiceRedirectedInIncognito() const OVERRIDE; |
- virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( |
+ virtual ProfileKeyedService* BuildServiceInstanceFor( |
Profile* profile) const OVERRIDE; |
virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
}; |