OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 5 #ifndef IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
6 #define IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 6 #define IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" | 11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" |
12 | 12 |
| 13 namespace base { |
13 template <typename T> | 14 template <typename T> |
14 struct DefaultSingletonTraits; | 15 struct DefaultSingletonTraits; |
| 16 } // namespace base |
| 17 |
15 class KeywordWebDataService; | 18 class KeywordWebDataService; |
16 class TokenWebData; | 19 class TokenWebData; |
17 class WebDataServiceWrapper; | 20 class WebDataServiceWrapper; |
18 enum class ServiceAccessType; | 21 enum class ServiceAccessType; |
19 | 22 |
20 namespace autofill { | 23 namespace autofill { |
21 class AutofillWebDataService; | 24 class AutofillWebDataService; |
22 } | 25 } |
23 | 26 |
24 namespace ios { | 27 namespace ios { |
(...skipping 23 matching lines...) Expand all Loading... |
48 ServiceAccessType access_type); | 51 ServiceAccessType access_type); |
49 | 52 |
50 // Returns the TokenWebData associated with |browser_state|. | 53 // Returns the TokenWebData associated with |browser_state|. |
51 static scoped_refptr<TokenWebData> GetTokenWebDataForBrowserState( | 54 static scoped_refptr<TokenWebData> GetTokenWebDataForBrowserState( |
52 ios::ChromeBrowserState* browser_state, | 55 ios::ChromeBrowserState* browser_state, |
53 ServiceAccessType access_type); | 56 ServiceAccessType access_type); |
54 | 57 |
55 static WebDataServiceFactory* GetInstance(); | 58 static WebDataServiceFactory* GetInstance(); |
56 | 59 |
57 private: | 60 private: |
58 friend struct DefaultSingletonTraits<WebDataServiceFactory>; | 61 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; |
59 | 62 |
60 WebDataServiceFactory(); | 63 WebDataServiceFactory(); |
61 ~WebDataServiceFactory() override; | 64 ~WebDataServiceFactory() override; |
62 | 65 |
63 // BrowserStateKeyedServiceFactory implementation. | 66 // BrowserStateKeyedServiceFactory implementation. |
64 scoped_ptr<KeyedService> BuildServiceInstanceFor( | 67 scoped_ptr<KeyedService> BuildServiceInstanceFor( |
65 web::BrowserState* context) const override; | 68 web::BrowserState* context) const override; |
66 web::BrowserState* GetBrowserStateToUse( | 69 web::BrowserState* GetBrowserStateToUse( |
67 web::BrowserState* context) const override; | 70 web::BrowserState* context) const override; |
68 bool ServiceIsNULLWhileTesting() const override; | 71 bool ServiceIsNULLWhileTesting() const override; |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 73 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
71 }; | 74 }; |
72 | 75 |
73 } // namespace ios | 76 } // namespace ios |
74 | 77 |
75 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 78 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
OLD | NEW |