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_WEB_DATA_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 6 #define 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 "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
11 #include "components/keyed_service/core/service_access_type.h" | 11 #include "components/keyed_service/core/service_access_type.h" |
12 | 12 |
| 13 namespace base { |
13 template <typename T> struct DefaultSingletonTraits; | 14 template <typename T> struct DefaultSingletonTraits; |
| 15 } |
| 16 |
14 class KeywordWebDataService; | 17 class KeywordWebDataService; |
15 class Profile; | 18 class Profile; |
16 class TokenWebData; | 19 class TokenWebData; |
17 class WebDataServiceWrapper; | 20 class WebDataServiceWrapper; |
18 | 21 |
19 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
20 class PasswordWebDataService; | 23 class PasswordWebDataService; |
21 #endif | 24 #endif |
22 | 25 |
23 namespace autofill { | 26 namespace autofill { |
(...skipping 29 matching lines...) Expand all Loading... |
53 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
54 // Returns the PasswordWebDataService associated with the |profile|. | 57 // Returns the PasswordWebDataService associated with the |profile|. |
55 static scoped_refptr<PasswordWebDataService> GetPasswordWebDataForProfile( | 58 static scoped_refptr<PasswordWebDataService> GetPasswordWebDataForProfile( |
56 Profile* profile, | 59 Profile* profile, |
57 ServiceAccessType access_type); | 60 ServiceAccessType access_type); |
58 #endif | 61 #endif |
59 | 62 |
60 static WebDataServiceFactory* GetInstance(); | 63 static WebDataServiceFactory* GetInstance(); |
61 | 64 |
62 private: | 65 private: |
63 friend struct DefaultSingletonTraits<WebDataServiceFactory>; | 66 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; |
64 | 67 |
65 WebDataServiceFactory(); | 68 WebDataServiceFactory(); |
66 ~WebDataServiceFactory() override; | 69 ~WebDataServiceFactory() override; |
67 | 70 |
68 // |BrowserContextKeyedBaseFactory| methods: | 71 // |BrowserContextKeyedBaseFactory| methods: |
69 content::BrowserContext* GetBrowserContextToUse( | 72 content::BrowserContext* GetBrowserContextToUse( |
70 content::BrowserContext* context) const override; | 73 content::BrowserContext* context) const override; |
71 KeyedService* BuildServiceInstanceFor( | 74 KeyedService* BuildServiceInstanceFor( |
72 content::BrowserContext* profile) const override; | 75 content::BrowserContext* profile) const override; |
73 bool ServiceIsNULLWhileTesting() const override; | 76 bool ServiceIsNULLWhileTesting() const override; |
74 | 77 |
75 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); | 78 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); |
76 }; | 79 }; |
77 | 80 |
78 #endif // CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ | 81 #endif // CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ |
OLD | NEW |