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

Unified Diff: content/browser/payments/payment_app_database.h

Issue 2844673002: PaymentHandler: Implement PaymentInstruments.has(). (Closed)
Patch Set: PaymentHandler: Implement PaymentInstruments.has(). 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/payments/mojom/payment_app.mojom ('k') | content/browser/payments/payment_app_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/payments/payment_app_database.h
diff --git a/content/browser/payments/payment_app_database.h b/content/browser/payments/payment_app_database.h
index 7c810522d2d320236ffa3ad850ccc277c18cdc0c..2635d3877cf51485828331836d56f7470cefedb0 100644
--- a/content/browser/payments/payment_app_database.h
+++ b/content/browser/payments/payment_app_database.h
@@ -37,6 +37,8 @@ class CONTENT_EXPORT PaymentAppDatabase {
using ReadPaymentInstrumentCallback =
base::OnceCallback<void(payments::mojom::PaymentInstrumentPtr,
payments::mojom::PaymentHandlerStatus)>;
+ using HasPaymentInstrumentCallback =
+ base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
using WritePaymentInstrumentCallback =
base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
@@ -55,6 +57,9 @@ class CONTENT_EXPORT PaymentAppDatabase {
void ReadPaymentInstrument(const GURL& scope,
const std::string& instrument_key,
ReadPaymentInstrumentCallback callback);
+ void HasPaymentInstrument(const GURL& scope,
+ const std::string& instrument_key,
+ HasPaymentInstrumentCallback callback);
void WritePaymentInstrument(const GURL& scope,
const std::string& instrument_key,
payments::mojom::PaymentInstrumentPtr instrument,
@@ -109,6 +114,18 @@ class CONTENT_EXPORT PaymentAppDatabase {
const std::vector<std::string>& data,
ServiceWorkerStatusCode status);
+ // HasPaymentInstrument callbacks
+ void DidFindRegistrationToHasPaymentInstrument(
+ const std::string& instrument_key,
+ HasPaymentInstrumentCallback callback,
+ ServiceWorkerStatusCode status,
+ scoped_refptr<ServiceWorkerRegistration> registration);
+ void DidHasPaymentInstrument(int64_t registration_id,
+ const std::string& instrument_key,
+ DeletePaymentInstrumentCallback callback,
+ const std::vector<std::string>& data,
+ ServiceWorkerStatusCode status);
+
// WritePaymentInstrument callbacks
void DidFindRegistrationToWritePaymentInstrument(
const std::string& instrument_key,
« no previous file with comments | « components/payments/mojom/payment_app.mojom ('k') | content/browser/payments/payment_app_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698