Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: chrome/browser/web_data_service_factory.h

Issue 2838433002: [Payments] Cache payment manifests. (Closed)
Patch Set: fix tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "build/build_config.h" 10 #include "build/build_config.h"
11 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 11 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
12 #include "components/keyed_service/core/service_access_type.h" 12 #include "components/keyed_service/core/service_access_type.h"
13 13
14 namespace base { 14 namespace base {
15 template <typename T> struct DefaultSingletonTraits; 15 template <typename T> struct DefaultSingletonTraits;
16 } 16 }
17 17
18 class KeywordWebDataService; 18 class KeywordWebDataService;
19 class Profile; 19 class Profile;
20 class TokenWebData; 20 class TokenWebData;
21 class WebDataServiceWrapper; 21 class WebDataServiceWrapper;
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 class PasswordWebDataService; 24 class PasswordWebDataService;
25 #endif 25 #endif
26 26
27 #if defined(OS_ANDROID)
28 namespace payments {
29 class PaymentManifestWebDataService;
30 } // namespace payments
please use gerrit instead 2017/04/24 18:22:32 Remove this comment to match the rest of the file.
gogerald1 2017/04/26 13:46:33 Done.
31 #endif
32
27 namespace autofill { 33 namespace autofill {
28 class AutofillWebDataService; 34 class AutofillWebDataService;
29 } 35 }
30 36
31 // Singleton that owns all WebDataServiceWrappers and associates them with 37 // Singleton that owns all WebDataServiceWrappers and associates them with
32 // Profiles. 38 // Profiles.
33 class WebDataServiceFactory : public BrowserContextKeyedServiceFactory { 39 class WebDataServiceFactory : public BrowserContextKeyedServiceFactory {
34 public: 40 public:
35 // Returns the WebDataServiceWrapper associated with the |profile|. 41 // Returns the WebDataServiceWrapper associated with the |profile|.
36 static WebDataServiceWrapper* GetForProfile(Profile* profile, 42 static WebDataServiceWrapper* GetForProfile(Profile* profile,
(...skipping 17 matching lines...) Expand all
54 Profile* profile, 60 Profile* profile,
55 ServiceAccessType access_type); 61 ServiceAccessType access_type);
56 62
57 #if defined(OS_WIN) 63 #if defined(OS_WIN)
58 // Returns the PasswordWebDataService associated with the |profile|. 64 // Returns the PasswordWebDataService associated with the |profile|.
59 static scoped_refptr<PasswordWebDataService> GetPasswordWebDataForProfile( 65 static scoped_refptr<PasswordWebDataService> GetPasswordWebDataForProfile(
60 Profile* profile, 66 Profile* profile,
61 ServiceAccessType access_type); 67 ServiceAccessType access_type);
62 #endif 68 #endif
63 69
70 #if defined(OS_ANDROID)
71 static scoped_refptr<payments::PaymentManifestWebDataService>
72 GetPaymentManifestWebDataForProfile(Profile* profile,
73 ServiceAccessType access_type);
74 #endif
75
64 static WebDataServiceFactory* GetInstance(); 76 static WebDataServiceFactory* GetInstance();
65 77
66 private: 78 private:
67 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>; 79 friend struct base::DefaultSingletonTraits<WebDataServiceFactory>;
68 80
69 WebDataServiceFactory(); 81 WebDataServiceFactory();
70 ~WebDataServiceFactory() override; 82 ~WebDataServiceFactory() override;
71 83
72 // |BrowserContextKeyedBaseFactory| methods: 84 // |BrowserContextKeyedBaseFactory| methods:
73 content::BrowserContext* GetBrowserContextToUse( 85 content::BrowserContext* GetBrowserContextToUse(
74 content::BrowserContext* context) const override; 86 content::BrowserContext* context) const override;
75 KeyedService* BuildServiceInstanceFor( 87 KeyedService* BuildServiceInstanceFor(
76 content::BrowserContext* profile) const override; 88 content::BrowserContext* profile) const override;
77 bool ServiceIsNULLWhileTesting() const override; 89 bool ServiceIsNULLWhileTesting() const override;
78 90
79 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory); 91 DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory);
80 }; 92 };
81 93
82 #endif // CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_ 94 #endif // CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698