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

Side by Side Diff: content/browser/payments/payment_app_database.h

Issue 2858773002: Revert of PaymentHandler: Implement PaymentInstruments.keys(). (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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_
6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_ 6 #define CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 payments::mojom::PaymentAppManifestError)>; 30 payments::mojom::PaymentAppManifestError)>;
31 using ManifestWithID = 31 using ManifestWithID =
32 std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>; 32 std::pair<int64_t, payments::mojom::PaymentAppManifestPtr>;
33 using Manifests = std::vector<ManifestWithID>; 33 using Manifests = std::vector<ManifestWithID>;
34 using ReadAllManifestsCallback = base::Callback<void(Manifests)>; 34 using ReadAllManifestsCallback = base::Callback<void(Manifests)>;
35 using DeletePaymentInstrumentCallback = 35 using DeletePaymentInstrumentCallback =
36 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>; 36 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
37 using ReadPaymentInstrumentCallback = 37 using ReadPaymentInstrumentCallback =
38 base::OnceCallback<void(payments::mojom::PaymentInstrumentPtr, 38 base::OnceCallback<void(payments::mojom::PaymentInstrumentPtr,
39 payments::mojom::PaymentHandlerStatus)>; 39 payments::mojom::PaymentHandlerStatus)>;
40 using KeysOfPaymentInstrumentsCallback =
41 base::OnceCallback<void(const std::vector<std::string>&,
42 payments::mojom::PaymentHandlerStatus)>;
43 using HasPaymentInstrumentCallback = 40 using HasPaymentInstrumentCallback =
44 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>; 41 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
45 using WritePaymentInstrumentCallback = 42 using WritePaymentInstrumentCallback =
46 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>; 43 base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
47 44
48 explicit PaymentAppDatabase( 45 explicit PaymentAppDatabase(
49 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context); 46 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
50 ~PaymentAppDatabase(); 47 ~PaymentAppDatabase();
51 48
52 void WriteManifest(const GURL& scope, 49 void WriteManifest(const GURL& scope,
53 payments::mojom::PaymentAppManifestPtr manifest, 50 payments::mojom::PaymentAppManifestPtr manifest,
54 const WriteManifestCallback& callback); 51 const WriteManifestCallback& callback);
55 void ReadManifest(const GURL& scope, const ReadManifestCallback& callback); 52 void ReadManifest(const GURL& scope, const ReadManifestCallback& callback);
56 void ReadAllManifests(const ReadAllManifestsCallback& callback); 53 void ReadAllManifests(const ReadAllManifestsCallback& callback);
57 void DeletePaymentInstrument(const GURL& scope, 54 void DeletePaymentInstrument(const GURL& scope,
58 const std::string& instrument_key, 55 const std::string& instrument_key,
59 DeletePaymentInstrumentCallback callback); 56 DeletePaymentInstrumentCallback callback);
60 void ReadPaymentInstrument(const GURL& scope, 57 void ReadPaymentInstrument(const GURL& scope,
61 const std::string& instrument_key, 58 const std::string& instrument_key,
62 ReadPaymentInstrumentCallback callback); 59 ReadPaymentInstrumentCallback callback);
63 void KeysOfPaymentInstruments(const GURL& scope,
64 KeysOfPaymentInstrumentsCallback callback);
65 void HasPaymentInstrument(const GURL& scope, 60 void HasPaymentInstrument(const GURL& scope,
66 const std::string& instrument_key, 61 const std::string& instrument_key,
67 HasPaymentInstrumentCallback callback); 62 HasPaymentInstrumentCallback callback);
68 void WritePaymentInstrument(const GURL& scope, 63 void WritePaymentInstrument(const GURL& scope,
69 const std::string& instrument_key, 64 const std::string& instrument_key,
70 payments::mojom::PaymentInstrumentPtr instrument, 65 payments::mojom::PaymentInstrumentPtr instrument,
71 WritePaymentInstrumentCallback callback); 66 WritePaymentInstrumentCallback callback);
72 67
73 private: 68 private:
74 // WriteManifest callbacks 69 // WriteManifest callbacks
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // ReadPaymentInstrument callbacks 107 // ReadPaymentInstrument callbacks
113 void DidFindRegistrationToReadPaymentInstrument( 108 void DidFindRegistrationToReadPaymentInstrument(
114 const std::string& instrument_key, 109 const std::string& instrument_key,
115 ReadPaymentInstrumentCallback callback, 110 ReadPaymentInstrumentCallback callback,
116 ServiceWorkerStatusCode status, 111 ServiceWorkerStatusCode status,
117 scoped_refptr<ServiceWorkerRegistration> registration); 112 scoped_refptr<ServiceWorkerRegistration> registration);
118 void DidReadPaymentInstrument(ReadPaymentInstrumentCallback callback, 113 void DidReadPaymentInstrument(ReadPaymentInstrumentCallback callback,
119 const std::vector<std::string>& data, 114 const std::vector<std::string>& data,
120 ServiceWorkerStatusCode status); 115 ServiceWorkerStatusCode status);
121 116
122 // KeysOfPaymentInstruments callbacks
123 void DidFindRegistrationToGetKeys(
124 KeysOfPaymentInstrumentsCallback callback,
125 ServiceWorkerStatusCode status,
126 scoped_refptr<ServiceWorkerRegistration> registration);
127 void DidGetKeysOfPaymentInstruments(KeysOfPaymentInstrumentsCallback callback,
128 const std::vector<std::string>& data,
129 ServiceWorkerStatusCode status);
130
131 // HasPaymentInstrument callbacks 117 // HasPaymentInstrument callbacks
132 void DidFindRegistrationToHasPaymentInstrument( 118 void DidFindRegistrationToHasPaymentInstrument(
133 const std::string& instrument_key, 119 const std::string& instrument_key,
134 HasPaymentInstrumentCallback callback, 120 HasPaymentInstrumentCallback callback,
135 ServiceWorkerStatusCode status, 121 ServiceWorkerStatusCode status,
136 scoped_refptr<ServiceWorkerRegistration> registration); 122 scoped_refptr<ServiceWorkerRegistration> registration);
137 void DidHasPaymentInstrument(int64_t registration_id, 123 void DidHasPaymentInstrument(int64_t registration_id,
138 const std::string& instrument_key, 124 const std::string& instrument_key,
139 DeletePaymentInstrumentCallback callback, 125 DeletePaymentInstrumentCallback callback,
140 const std::vector<std::string>& data, 126 const std::vector<std::string>& data,
(...skipping 11 matching lines...) Expand all
152 138
153 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 139 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
154 base::WeakPtrFactory<PaymentAppDatabase> weak_ptr_factory_; 140 base::WeakPtrFactory<PaymentAppDatabase> weak_ptr_factory_;
155 141
156 DISALLOW_COPY_AND_ASSIGN(PaymentAppDatabase); 142 DISALLOW_COPY_AND_ASSIGN(PaymentAppDatabase);
157 }; 143 };
158 144
159 } // namespace content 145 } // namespace content
160 146
161 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_ 147 #endif // CONTENT_BROWSER_PAYMENTS_PAYMENT_APP_DATABASE_H_
OLDNEW
« no previous file with comments | « content/browser/payments/payment_app.proto ('k') | content/browser/payments/payment_app_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698