| 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_manager.h" | 5 #include "content/browser/payments/payment_app_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" |
| 11 #include "content/browser/payments/payment_app_context.h" | 11 #include "content/browser/payments/payment_app_context_impl.h" |
| 12 #include "content/browser/payments/payment_app_data_conversions.h" | 12 #include "content/browser/payments/payment_app_data_conversions.h" |
| 13 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 13 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 14 #include "content/browser/service_worker/service_worker_registration.h" | 14 #include "content/browser/service_worker/service_worker_registration.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const char kPaymentAppManifestDataKey[] = "PaymentAppManifestData"; | 20 const char kPaymentAppManifestDataKey[] = "PaymentAppManifestData"; |
| 21 | 21 |
| 22 } // namespace | 22 } // namespace |
| 23 | 23 |
| 24 PaymentAppManager::~PaymentAppManager() { | 24 PaymentAppManager::~PaymentAppManager() { |
| 25 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 25 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 26 } | 26 } |
| 27 | 27 |
| 28 PaymentAppManager::PaymentAppManager( | 28 PaymentAppManager::PaymentAppManager( |
| 29 PaymentAppContext* payment_app_context, | 29 PaymentAppContextImpl* payment_app_context, |
| 30 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request) | 30 mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request) |
| 31 : payment_app_context_(payment_app_context), | 31 : payment_app_context_(payment_app_context), |
| 32 binding_(this, std::move(request)), | 32 binding_(this, std::move(request)), |
| 33 weak_ptr_factory_(this) { | 33 weak_ptr_factory_(this) { |
| 34 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 34 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 35 DCHECK(payment_app_context); | 35 DCHECK(payment_app_context); |
| 36 | 36 |
| 37 binding_.set_connection_error_handler( | 37 binding_.set_connection_error_handler( |
| 38 base::Bind(&PaymentAppManager::OnConnectionError, | 38 base::Bind(&PaymentAppManager::OnConnectionError, |
| 39 base::Unretained(this))); | 39 base::Unretained(this))); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 payments::mojom::PaymentAppManifestError:: | 136 payments::mojom::PaymentAppManifestError:: |
| 137 MANIFEST_STORAGE_OPERATION_FAILED); | 137 MANIFEST_STORAGE_OPERATION_FAILED); |
| 138 return; | 138 return; |
| 139 } | 139 } |
| 140 | 140 |
| 141 callback.Run(std::move(manifest), | 141 callback.Run(std::move(manifest), |
| 142 payments::mojom::PaymentAppManifestError::NONE); | 142 payments::mojom::PaymentAppManifestError::NONE); |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace content | 145 } // namespace content |
| OLD | NEW |