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

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

Issue 2856973002: PaymentHandler: Implement PaymentInstruments.clear(). (Closed)
Patch Set: 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
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
please use gerrit instead 2017/05/02 20:08:12 Wouldn't it be simpler to have one call with one c
zino 2017/05/03 14:50:00 Sorry, I don't understand your words fully. If yo
+ 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_;

Powered by Google App Engine
This is Rietveld 408576698