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 <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" | 12 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 template <typename T> | 15 template <typename T> |
15 struct DefaultSingletonTraits; | 16 struct DefaultSingletonTraits; |
16 } // namespace base | 17 } // namespace base |
17 | 18 |
18 class KeywordWebDataService; | 19 class KeywordWebDataService; |
19 class TokenWebData; | 20 class TokenWebData; |
20 class WebDataServiceWrapper; | 21 class WebDataServiceWrapper; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 58 |
58 static WebDataServiceFactory* GetInstance(); | 59 static WebDataServiceFactory* GetInstance(); |
59 | 60 |
60 private: | 61 private: |
61 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; | 62 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; |
62 | 63 |
63 WebDataServiceFactory(); | 64 WebDataServiceFactory(); |
64 ~WebDataServiceFactory() override; | 65 ~WebDataServiceFactory() override; |
65 | 66 |
66 // BrowserStateKeyedServiceFactory implementation. | 67 // BrowserStateKeyedServiceFactory implementation. |
67 scoped_ptr<KeyedService> BuildServiceInstanceFor( | 68 std::unique_ptr<KeyedService> BuildServiceInstanceFor( |
68 web::BrowserState* context) const override; | 69 web::BrowserState* context) const override; |
69 web::BrowserState* GetBrowserStateToUse( | 70 web::BrowserState* GetBrowserStateToUse( |
70 web::BrowserState* context) const override; | 71 web::BrowserState* context) const override; |
71 bool ServiceIsNULLWhileTesting() const override; | 72 bool ServiceIsNULLWhileTesting() const override; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 74 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace ios | 77 } // namespace ios |
77 | 78 |
78 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 79 #endif // IOS_CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
OLD | NEW |