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

Side by Side Diff: content/browser/payments/payment_manager.cc

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 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 #include "content/browser/payments/payment_manager.h" 5 #include "content/browser/payments/payment_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/optional.h" 10 #include "base/optional.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void PaymentManager::SetPaymentInstrument( 95 void PaymentManager::SetPaymentInstrument(
96 const std::string& instrument_key, 96 const std::string& instrument_key,
97 payments::mojom::PaymentInstrumentPtr details, 97 payments::mojom::PaymentInstrumentPtr details,
98 const PaymentManager::SetPaymentInstrumentCallback& callback) { 98 const PaymentManager::SetPaymentInstrumentCallback& callback) {
99 DCHECK_CURRENTLY_ON(BrowserThread::IO); 99 DCHECK_CURRENTLY_ON(BrowserThread::IO);
100 100
101 payment_app_context_->payment_app_database()->WritePaymentInstrument( 101 payment_app_context_->payment_app_database()->WritePaymentInstrument(
102 scope_, instrument_key, std::move(details), callback); 102 scope_, instrument_key, std::move(details), callback);
103 } 103 }
104 104
105 void PaymentManager::ClearPaymentInstruments(
106 const ClearPaymentInstrumentsCallback& callback) {
107 DCHECK_CURRENTLY_ON(BrowserThread::IO);
108
109 payment_app_context_->payment_app_database()->ClearPaymentInstruments(
110 scope_, callback);
111 }
112
105 void PaymentManager::OnConnectionError() { 113 void PaymentManager::OnConnectionError() {
106 DCHECK_CURRENTLY_ON(BrowserThread::IO); 114 DCHECK_CURRENTLY_ON(BrowserThread::IO);
107 payment_app_context_->PaymentManagerHadConnectionError(this); 115 payment_app_context_->PaymentManagerHadConnectionError(this);
108 } 116 }
109 117
110 } // namespace content 118 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/payments/payment_manager.h ('k') | content/browser/payments/payment_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698