| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_CAN_MAKE_PAYMENT_QUERY_FACTORY_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_CAN_MAKE_PAYMENT_QUERY_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 10 |
| 11 namespace base { |
| 12 template <typename T> |
| 13 struct DefaultSingletonTraits; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 class BrowserContext; |
| 18 } |
| 19 |
| 20 namespace payments { |
| 21 |
| 22 class CanMakePaymentQuery; |
| 23 |
| 24 // Ensures that there's only one instance of CanMakePaymentQuery per browser |
| 25 // context. |
| 26 class CanMakePaymentQueryFactory : public BrowserContextKeyedServiceFactory { |
| 27 public: |
| 28 static CanMakePaymentQueryFactory* GetInstance(); |
| 29 CanMakePaymentQuery* GetForContext(content::BrowserContext* context); |
| 30 |
| 31 private: |
| 32 friend struct base::DefaultSingletonTraits<CanMakePaymentQueryFactory>; |
| 33 |
| 34 CanMakePaymentQueryFactory(); |
| 35 ~CanMakePaymentQueryFactory() override; |
| 36 |
| 37 // BrowserContextKeyedServiceFactory: |
| 38 KeyedService* BuildServiceInstanceFor( |
| 39 content::BrowserContext* context) const override; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(CanMakePaymentQueryFactory); |
| 42 }; |
| 43 |
| 44 } // namespace payments |
| 45 |
| 46 #endif // COMPONENTS_PAYMENTS_CONTENT_CAN_MAKE_PAYMENT_QUERY_FACTORY_H_ |
| OLD | NEW |