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 template <typename T> | 13 template <typename T> |
14 struct DefaultSingletonTraits; | 14 struct base::DefaultSingletonTraits; |
15 class KeywordWebDataService; | 15 class KeywordWebDataService; |
16 class TokenWebData; | 16 class TokenWebData; |
17 class WebDataServiceWrapper; | 17 class WebDataServiceWrapper; |
18 enum class ServiceAccessType; | 18 enum class ServiceAccessType; |
19 | 19 |
20 namespace autofill { | 20 namespace autofill { |
21 class AutofillWebDataService; | 21 class AutofillWebDataService; |
22 } | 22 } |
23 | 23 |
24 namespace ios { | 24 namespace ios { |
(...skipping 23 matching lines...) Expand all Loading... |
48 ServiceAccessType access_type); | 48 ServiceAccessType access_type); |
49 | 49 |
50 // Returns the TokenWebData associated with |browser_state|. | 50 // Returns the TokenWebData associated with |browser_state|. |
51 static scoped_refptr<TokenWebData> GetTokenWebDataForBrowserState( | 51 static scoped_refptr<TokenWebData> GetTokenWebDataForBrowserState( |
52 ios::ChromeBrowserState* browser_state, | 52 ios::ChromeBrowserState* browser_state, |
53 ServiceAccessType access_type); | 53 ServiceAccessType access_type); |
54 | 54 |
55 static WebDataServiceFactory* GetInstance(); | 55 static WebDataServiceFactory* GetInstance(); |
56 | 56 |
57 private: | 57 private: |
58 friend struct DefaultSingletonTraits<WebDataServiceFactory>; | 58 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; |
59 | 59 |
60 WebDataServiceFactory(); | 60 WebDataServiceFactory(); |
61 ~WebDataServiceFactory() override; | 61 ~WebDataServiceFactory() override; |
62 | 62 |
63 // BrowserStateKeyedServiceFactory implementation. | 63 // BrowserStateKeyedServiceFactory implementation. |
64 scoped_ptr<KeyedService> BuildServiceInstanceFor( | 64 scoped_ptr<KeyedService> BuildServiceInstanceFor( |
65 web::BrowserState* context) const override; | 65 web::BrowserState* context) const override; |
66 web::BrowserState* GetBrowserStateToUse( | 66 web::BrowserState* GetBrowserStateToUse( |
67 web::BrowserState* context) const override; | 67 web::BrowserState* context) const override; |
68 bool ServiceIsNULLWhileTesting() const override; | 68 bool ServiceIsNULLWhileTesting() const override; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 70 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace ios | 73 } // namespace ios |
74 | 74 |
75 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 75 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
OLD | NEW |