OLD | NEW |
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 Loading... |
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 |
OLD | NEW |