Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 explicit WebDataServiceWrapper(Profile* profile); | 26 explicit WebDataServiceWrapper(Profile* profile); |
| 27 | 27 |
| 28 // For testing. | 28 // For testing. |
| 29 WebDataServiceWrapper(); | 29 WebDataServiceWrapper(); |
| 30 | 30 |
| 31 virtual ~WebDataServiceWrapper(); | 31 virtual ~WebDataServiceWrapper(); |
| 32 | 32 |
| 33 // BrowserContextKeyedService: | 33 // BrowserContextKeyedService: |
| 34 virtual void Shutdown() OVERRIDE; | 34 virtual void Shutdown() OVERRIDE; |
| 35 | 35 |
| 36 virtual scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData(); | 36 virtual autofill::AutofillWebDataService* GetAutofillWebData(); |
| 37 | 37 |
| 38 virtual scoped_refptr<WebDataService> GetWebData(); | 38 virtual scoped_refptr<WebDataService> GetWebData(); |
| 39 | 39 |
| 40 virtual scoped_refptr<TokenWebData> GetTokenWebData(); | 40 virtual TokenWebData* GetTokenWebData(); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 scoped_refptr<WebDatabaseService> web_database_; | 43 scoped_refptr<WebDatabaseService> web_database_; |
| 44 | 44 |
| 45 scoped_refptr<autofill::AutofillWebDataService> autofill_web_data_; | 45 scoped_ptr<autofill::AutofillWebDataService> autofill_web_data_; |
|
Lei Zhang
2013/06/07 20:42:49
IWYU: add scoped_ptr.h.
Cait (Slow)
2013/06/07 21:00:42
Done.
| |
| 46 scoped_refptr<TokenWebData> token_web_data_; | 46 scoped_ptr<TokenWebData> token_web_data_; |
| 47 scoped_refptr<WebDataService> web_data_; | 47 scoped_refptr<WebDataService> web_data_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper); | 49 DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // Singleton that owns all WebDataServiceWrappers and associates them with | 52 // Singleton that owns all WebDataServiceWrappers and associates them with |
| 53 // Profiles. | 53 // Profiles. |
| 54 class WebDataServiceFactory : public BrowserContextKeyedServiceFactory { | 54 class WebDataServiceFactory : public BrowserContextKeyedServiceFactory { |
| 55 public: | 55 public: |
| 56 // Returns the |WebDataServiceWrapper| associated with the |profile|. | 56 // Returns the |WebDataServiceWrapper| associated with the |profile|. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 74 virtual content::BrowserContext* GetBrowserContextToUse( | 74 virtual content::BrowserContext* GetBrowserContextToUse( |
| 75 content::BrowserContext* context) const OVERRIDE; | 75 content::BrowserContext* context) const OVERRIDE; |
| 76 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 76 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
| 77 content::BrowserContext* profile) const OVERRIDE; | 77 content::BrowserContext* profile) const OVERRIDE; |
| 78 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 78 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 80 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 83 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
| OLD | NEW |