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

Side by Side Diff: components/payments/content/can_make_payment_query_factory.h

Issue 2866623003: PaymentRequest.canMakePayment() query quota on desktop. (Closed)
Patch Set: Created 3 years, 7 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
(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_
Mathieu 2017/05/08 15:28:11 Is this file in components/payments/content becaus
please use gerrit instead 2017/05/08 17:28:47 Yep, that's exactly why.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698