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

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

Issue 2856973002: PaymentHandler: Implement PaymentInstruments.clear(). (Closed)
Patch Set: PaymentHandler: Implement PaymentInstruments.clear(). 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 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 9219e0bfb71cbb0b9777ed96bf304a4891cd5b1b..9155f4f8c5748090c44ae8487cb4e7775390208d 100644
--- a/content/browser/payments/payment_app_database.h
+++ b/content/browser/payments/payment_app_database.h
@@ -44,6 +44,8 @@ class CONTENT_EXPORT PaymentAppDatabase {
base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
using WritePaymentInstrumentCallback =
base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
+ using ClearPaymentInstrumentsCallback =
+ base::OnceCallback<void(payments::mojom::PaymentHandlerStatus)>;
explicit PaymentAppDatabase(
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context);
@@ -69,6 +71,8 @@ class CONTENT_EXPORT PaymentAppDatabase {
const std::string& instrument_key,
payments::mojom::PaymentInstrumentPtr instrument,
WritePaymentInstrumentCallback callback);
+ void ClearPaymentInstruments(const GURL& scope,
+ ClearPaymentInstrumentsCallback callback);
private:
// WriteManifest callbacks
@@ -150,6 +154,20 @@ class CONTENT_EXPORT PaymentAppDatabase {
void DidWritePaymentInstrument(WritePaymentInstrumentCallback callback,
ServiceWorkerStatusCode status);
+ // ClearPaymentInstruments callbacks
+ void DidFindRegistrationToClearPaymentInstruments(
+ const GURL& scope,
+ ClearPaymentInstrumentsCallback callback,
+ ServiceWorkerStatusCode status,
+ scoped_refptr<ServiceWorkerRegistration> registration);
+ void DidGetKeysToClearPaymentInstruments(
+ int64_t registration_id,
+ ClearPaymentInstrumentsCallback callback,
+ const std::vector<std::string>& keys,
+ payments::mojom::PaymentHandlerStatus status);
+ void DidClearPaymentInstruments(ClearPaymentInstrumentsCallback callback,
+ ServiceWorkerStatusCode status);
+
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
base::WeakPtrFactory<PaymentAppDatabase> weak_ptr_factory_;
« 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