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

Unified Diff: content/browser/payments/payment_app_manager.cc

Issue 2785523003: PaymentHandler: Rename PaymentAppManager to PaymentManager. (Closed)
Patch Set: PaymentHandler: Rename PaymentAppManager to PaymentManager. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/payments/payment_app_manager.cc
diff --git a/content/browser/payments/payment_app_manager.cc b/content/browser/payments/payment_app_manager.cc
deleted file mode 100644
index 9735028bdf1f8987b57d388b45d1b74e7b22c5ac..0000000000000000000000000000000000000000
--- a/content/browser/payments/payment_app_manager.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/payments/payment_app_manager.h"
-
-#include <utility>
-
-#include "base/bind.h"
-#include "base/optional.h"
-#include "content/browser/payments/payment_app.pb.h"
-#include "content/browser/payments/payment_app_context_impl.h"
-#include "content/browser/payments/payment_app_database.h"
-#include "content/browser/service_worker/service_worker_context_wrapper.h"
-#include "content/browser/service_worker/service_worker_registration.h"
-#include "content/public/browser/browser_thread.h"
-
-namespace content {
-
-PaymentAppManager::~PaymentAppManager() {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-}
-
-PaymentAppManager::PaymentAppManager(
- PaymentAppContextImpl* payment_app_context,
- mojo::InterfaceRequest<payments::mojom::PaymentAppManager> request)
- : payment_app_context_(payment_app_context),
- binding_(this, std::move(request)),
- weak_ptr_factory_(this) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DCHECK(payment_app_context);
-
- binding_.set_connection_error_handler(
- base::Bind(&PaymentAppManager::OnConnectionError,
- base::Unretained(this)));
-}
-
-void PaymentAppManager::Init(const std::string& scope) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- scope_ = GURL(scope);
-}
-
-void PaymentAppManager::SetManifest(
- payments::mojom::PaymentAppManifestPtr manifest,
- const SetManifestCallback& callback) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-
- // TODO(zino): Should implement requesting a permission for users to allow
- // the payment app to be registered. Please see http://crbug.com/665949.
-
- payment_app_context_->payment_app_database()->WriteManifest(
- scope_, std::move(manifest), callback);
-}
-
-void PaymentAppManager::GetManifest(const GetManifestCallback& callback) {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-
- payment_app_context_->payment_app_database()->ReadManifest(scope_, callback);
-}
-
-void PaymentAppManager::OnConnectionError() {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- payment_app_context_->PaymentAppManagerHadConnectionError(this);
-}
-
-} // namespace content
« no previous file with comments | « content/browser/payments/payment_app_manager.h ('k') | content/browser/payments/payment_app_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698