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

Unified Diff: chrome/browser/android/payments/service_worker_payment_app_bridge.cc

Issue 2609103002: PaymentApp: Add PaymentAppProvider class. (Closed)
Patch Set: Remove override keyword Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/payments/service_worker_payment_app_bridge.cc
diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
index 9ab20a3d8058a99f1baf4d338d141fcdb47fe142..9ea58f1cf33c3a2ddb2fe77a6d72502f40e25a7b 100644
--- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
+++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -10,7 +10,7 @@
#include "components/payments/payment_app.mojom.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/payment_app_context.h"
+#include "content/public/browser/payment_app_provider.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "jni/ServiceWorkerPaymentAppBridge_jni.h"
@@ -26,7 +26,7 @@ namespace {
void OnGotAllManifests(const JavaRef<jobject>& jweb_contents,
const JavaRef<jobject>& jcallback,
- content::PaymentAppContext::Manifests manifests) {
+ content::PaymentAppProvider::Manifests manifests) {
JNIEnv* env = AttachCurrentThread();
for (const auto& entry : manifests) {
@@ -67,17 +67,11 @@ static void GetAllAppManifests(JNIEnv* env,
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(jweb_contents);
- content::BrowserContext* browser_context = web_contents->GetBrowserContext();
-
- content::StoragePartition* storage_partition =
- content::BrowserContext::GetDefaultStoragePartition(browser_context);
-
- content::PaymentAppContext* payment_app_context =
- storage_partition->GetPaymentAppContext();
-
- payment_app_context->GetAllManifests(base::Bind(
- &OnGotAllManifests, ScopedJavaGlobalRef<jobject>(env, jweb_contents),
- ScopedJavaGlobalRef<jobject>(env, jcallback)));
+ content::PaymentAppProvider::GetInstance()->GetAllManifests(
+ web_contents->GetBrowserContext(),
+ base::Bind(&OnGotAllManifests,
+ ScopedJavaGlobalRef<jobject>(env, jweb_contents),
+ ScopedJavaGlobalRef<jobject>(env, jcallback)));
}
static void InvokePaymentApp(JNIEnv* env,
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698