| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 static WebDataServiceWrapper* GetForProfileIfExists( | 61 static WebDataServiceWrapper* GetForProfileIfExists( |
| 62 Profile* profile, | 62 Profile* profile, |
| 63 Profile::ServiceAccessType access_type); | 63 Profile::ServiceAccessType access_type); |
| 64 | 64 |
| 65 // Returns the AutofillWebDataService associated with the |profile|. | 65 // Returns the AutofillWebDataService associated with the |profile|. |
| 66 static scoped_refptr<autofill::AutofillWebDataService> | 66 static scoped_refptr<autofill::AutofillWebDataService> |
| 67 GetAutofillWebDataForProfile(Profile* profile, | 67 GetAutofillWebDataForProfile(Profile* profile, |
| 68 Profile::ServiceAccessType access_type); | 68 Profile::ServiceAccessType access_type); |
| 69 | 69 |
| 70 // Returns the TokenWebData associated with the |profile|. |
| 71 static scoped_refptr<TokenWebData> GetTokenWebDataForProfile(Profile* profile, |
| 72 Profile::ServiceAccessType access_type); |
| 73 |
| 70 static WebDataServiceFactory* GetInstance(); | 74 static WebDataServiceFactory* GetInstance(); |
| 71 | 75 |
| 72 private: | 76 private: |
| 73 friend struct DefaultSingletonTraits<WebDataServiceFactory>; | 77 friend struct DefaultSingletonTraits<WebDataServiceFactory>; |
| 74 | 78 |
| 75 WebDataServiceFactory(); | 79 WebDataServiceFactory(); |
| 76 virtual ~WebDataServiceFactory(); | 80 virtual ~WebDataServiceFactory(); |
| 77 | 81 |
| 78 // |BrowserContextKeyedBaseFactory| methods: | 82 // |BrowserContextKeyedBaseFactory| methods: |
| 79 virtual content::BrowserContext* GetBrowserContextToUse( | 83 virtual content::BrowserContext* GetBrowserContextToUse( |
| 80 content::BrowserContext* context) const OVERRIDE; | 84 content::BrowserContext* context) const OVERRIDE; |
| 81 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 85 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
| 82 content::BrowserContext* profile) const OVERRIDE; | 86 content::BrowserContext* profile) const OVERRIDE; |
| 83 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 87 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
| 84 | 88 |
| 85 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 89 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
| 86 }; | 90 }; |
| 87 | 91 |
| 88 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 92 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
| OLD | NEW |