| 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_app_context_impl.h" | 5 #include "content/browser/payments/payment_app_context_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void PaymentAppContextImpl::Shutdown() { | 32 void PaymentAppContextImpl::Shutdown() { |
| 33 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 33 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 34 | 34 |
| 35 BrowserThread::PostTaskAndReply( | 35 BrowserThread::PostTaskAndReply( |
| 36 BrowserThread::IO, FROM_HERE, | 36 BrowserThread::IO, FROM_HERE, |
| 37 base::Bind(&PaymentAppContextImpl::ShutdownOnIO, this), | 37 base::Bind(&PaymentAppContextImpl::ShutdownOnIO, this), |
| 38 base::Bind(&PaymentAppContextImpl::DidShutdown, this)); | 38 base::Bind(&PaymentAppContextImpl::DidShutdown, this)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void PaymentAppContextImpl::CreatePaymentManager( | 41 void PaymentAppContextImpl::CreatePaymentManager( |
| 42 mojo::InterfaceRequest<payments::mojom::PaymentManager> request) { | 42 const service_manager::BindSourceInfo& source_info, |
| 43 payments::mojom::PaymentManagerRequest request) { |
| 43 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 44 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 44 | 45 |
| 45 BrowserThread::PostTask( | 46 BrowserThread::PostTask( |
| 46 BrowserThread::IO, FROM_HERE, | 47 BrowserThread::IO, FROM_HERE, |
| 47 base::Bind(&PaymentAppContextImpl::CreatePaymentManagerOnIO, this, | 48 base::Bind(&PaymentAppContextImpl::CreatePaymentManagerOnIO, this, |
| 48 base::Passed(&request))); | 49 base::Passed(&request))); |
| 49 } | 50 } |
| 50 | 51 |
| 51 void PaymentAppContextImpl::PaymentManagerHadConnectionError( | 52 void PaymentAppContextImpl::PaymentManagerHadConnectionError( |
| 52 PaymentManager* payment_manager) { | 53 PaymentManager* payment_manager) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 payment_app_database_.reset(); | 89 payment_app_database_.reset(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void PaymentAppContextImpl::DidShutdown() { | 92 void PaymentAppContextImpl::DidShutdown() { |
| 92 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 93 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 93 | 94 |
| 94 is_shutdown_ = true; | 95 is_shutdown_ = true; |
| 95 } | 96 } |
| 96 | 97 |
| 97 } // namespace content | 98 } // namespace content |
| OLD | NEW |