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

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

Issue 2586203003: PaymentApp: Remove scope_url parameter from Get/SetManifest methods. (Closed)
Patch Set: rebased Created 4 years 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
index 52b3c7d170cede2814da910837e41ebbcea7dfdb..9735028bdf1f8987b57d388b45d1b74e7b22c5ac 100644
--- a/content/browser/payments/payment_app_manager.cc
+++ b/content/browser/payments/payment_app_manager.cc
@@ -35,8 +35,12 @@ PaymentAppManager::PaymentAppManager(
base::Unretained(this)));
}
+void PaymentAppManager::Init(const std::string& scope) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ scope_ = GURL(scope);
+}
+
void PaymentAppManager::SetManifest(
- const std::string& scope,
payments::mojom::PaymentAppManifestPtr manifest,
const SetManifestCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -45,15 +49,13 @@ void PaymentAppManager::SetManifest(
// the payment app to be registered. Please see http://crbug.com/665949.
payment_app_context_->payment_app_database()->WriteManifest(
- GURL(scope), std::move(manifest), callback);
+ scope_, std::move(manifest), callback);
}
-void PaymentAppManager::GetManifest(const std::string& scope,
- const GetManifestCallback& callback) {
+void PaymentAppManager::GetManifest(const GetManifestCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- payment_app_context_->payment_app_database()->ReadManifest(GURL(scope),
- callback);
+ payment_app_context_->payment_app_database()->ReadManifest(scope_, callback);
}
void PaymentAppManager::OnConnectionError() {
« 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