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 | |
74 static WebDataServiceFactory* GetInstance(); | 70 static WebDataServiceFactory* GetInstance(); |
75 | 71 |
76 private: | 72 private: |
77 friend struct DefaultSingletonTraits<WebDataServiceFactory>; | 73 friend struct DefaultSingletonTraits<WebDataServiceFactory>; |
78 | 74 |
79 WebDataServiceFactory(); | 75 WebDataServiceFactory(); |
80 virtual ~WebDataServiceFactory(); | 76 virtual ~WebDataServiceFactory(); |
81 | 77 |
82 // |BrowserContextKeyedBaseFactory| methods: | 78 // |BrowserContextKeyedBaseFactory| methods: |
83 virtual content::BrowserContext* GetBrowserContextToUse( | 79 virtual content::BrowserContext* GetBrowserContextToUse( |
84 content::BrowserContext* context) const OVERRIDE; | 80 content::BrowserContext* context) const OVERRIDE; |
85 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | 81 virtual BrowserContextKeyedService* BuildServiceInstanceFor( |
86 content::BrowserContext* profile) const OVERRIDE; | 82 content::BrowserContext* profile) const OVERRIDE; |
87 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 83 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; |
88 | 84 |
89 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 85 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
90 }; | 86 }; |
91 | 87 |
92 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ | 88 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__ |
OLD | NEW |