| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50   payment_app_context_->payment_app_database()->WriteManifest( | 50   payment_app_context_->payment_app_database()->WriteManifest( | 
| 51       scope_, std::move(manifest), callback); | 51       scope_, std::move(manifest), callback); | 
| 52 } | 52 } | 
| 53 | 53 | 
| 54 void PaymentManager::GetManifest(const GetManifestCallback& callback) { | 54 void PaymentManager::GetManifest(const GetManifestCallback& callback) { | 
| 55   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 55   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
| 56 | 56 | 
| 57   payment_app_context_->payment_app_database()->ReadManifest(scope_, callback); | 57   payment_app_context_->payment_app_database()->ReadManifest(scope_, callback); | 
| 58 } | 58 } | 
| 59 | 59 | 
|  | 60 void PaymentManager::DeletePaymentInstrument( | 
|  | 61     const std::string& instrument_key, | 
|  | 62     const PaymentManager::DeletePaymentInstrumentCallback& callback) { | 
|  | 63   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
|  | 64 | 
|  | 65   payment_app_context_->payment_app_database()->DeletePaymentInstrument( | 
|  | 66       scope_, instrument_key, callback); | 
|  | 67 } | 
|  | 68 | 
| 60 void PaymentManager::SetPaymentInstrument( | 69 void PaymentManager::SetPaymentInstrument( | 
| 61     const std::string& instrumentKey, | 70     const std::string& instrument_key, | 
| 62     payments::mojom::PaymentInstrumentPtr details, | 71     payments::mojom::PaymentInstrumentPtr details, | 
| 63     const PaymentManager::SetPaymentInstrumentCallback& callback) { | 72     const PaymentManager::SetPaymentInstrumentCallback& callback) { | 
| 64   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 73   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
| 65 | 74 | 
| 66   payment_app_context_->payment_app_database()->WritePaymentInstrument( | 75   payment_app_context_->payment_app_database()->WritePaymentInstrument( | 
| 67       scope_, instrumentKey, std::move(details), callback); | 76       scope_, instrument_key, std::move(details), callback); | 
| 68 } | 77 } | 
| 69 | 78 | 
| 70 void PaymentManager::GetPaymentInstrument( | 79 void PaymentManager::GetPaymentInstrument( | 
| 71     const std::string& instrumentKey, | 80     const std::string& instrument_key, | 
| 72     const PaymentManager::GetPaymentInstrumentCallback& callback) { | 81     const PaymentManager::GetPaymentInstrumentCallback& callback) { | 
| 73   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 82   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
| 74 | 83 | 
| 75   payment_app_context_->payment_app_database()->ReadPaymentInstrument( | 84   payment_app_context_->payment_app_database()->ReadPaymentInstrument( | 
| 76       scope_, instrumentKey, callback); | 85       scope_, instrument_key, callback); | 
| 77 } | 86 } | 
| 78 | 87 | 
| 79 void PaymentManager::OnConnectionError() { | 88 void PaymentManager::OnConnectionError() { | 
| 80   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 89   DCHECK_CURRENTLY_ON(BrowserThread::IO); | 
| 81   payment_app_context_->PaymentManagerHadConnectionError(this); | 90   payment_app_context_->PaymentManagerHadConnectionError(this); | 
| 82 } | 91 } | 
| 83 | 92 | 
| 84 }  // namespace content | 93 }  // namespace content | 
| OLD | NEW | 
|---|