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

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

Issue 2665583002: PaymentApp: Rename PaymentAppRequestData to PaymentAppRequest. (Closed)
Patch Set: PaymentApp: Rename PaymentAppRequestData to PaymentAppRequest. 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 | components/payments/payment_app.mojom » ('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 cf5391cb7bf282f8bac5eefd08e9632688d9572d..443e81aa1ad4f9c9fdde75a719dfa887751d83d9 100644
--- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
+++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -23,8 +23,8 @@ using base::android::JavaParamRef;
using base::android::JavaRef;
using base::android::ScopedJavaGlobalRef;
using base::android::ScopedJavaLocalRef;
-using payments::mojom::PaymentAppRequestData;
-using payments::mojom::PaymentAppRequestDataPtr;
+using payments::mojom::PaymentAppRequest;
+using payments::mojom::PaymentAppRequestPtr;
using payments::mojom::PaymentCurrencyAmount;
using payments::mojom::PaymentDetailsModifier;
using payments::mojom::PaymentDetailsModifierPtr;
@@ -96,10 +96,10 @@ static void InvokePaymentApp(JNIEnv* env,
content::WebContents* web_contents =
content::WebContents::FromJavaWebContents(jweb_contents);
- PaymentAppRequestDataPtr data = PaymentAppRequestData::New();
+ PaymentAppRequestPtr app_request = PaymentAppRequest::New();
- data->optionId = ConvertJavaStringToUTF8(env, joption_id);
- data->origin = GURL(ConvertJavaStringToUTF8(env, jorigin));
+ app_request->optionId = ConvertJavaStringToUTF8(env, joption_id);
+ app_request->origin = GURL(ConvertJavaStringToUTF8(env, jorigin));
for (jsize i = 0; i < env->GetArrayLength(jmethod_data); i++) {
ScopedJavaLocalRef<jobject> element(
@@ -115,18 +115,18 @@ static void InvokePaymentApp(JNIEnv* env,
env,
Java_ServiceWorkerPaymentAppBridge_getStringifiedDataFromMethodData(
env, element));
- data->methodData.push_back(std::move(methodData));
+ app_request->methodData.push_back(std::move(methodData));
}
- data->total = PaymentItem::New();
- data->total->label = ConvertJavaStringToUTF8(
+ app_request->total = PaymentItem::New();
+ app_request->total->label = ConvertJavaStringToUTF8(
env,
Java_ServiceWorkerPaymentAppBridge_getLabelFromPaymentItem(env, jtotal));
- data->total->amount = PaymentCurrencyAmount::New();
- data->total->amount->currency = ConvertJavaStringToUTF8(
+ app_request->total->amount = PaymentCurrencyAmount::New();
+ app_request->total->amount->currency = ConvertJavaStringToUTF8(
env, Java_ServiceWorkerPaymentAppBridge_getCurrencyFromPaymentItem(
env, jtotal));
- data->total->amount->value = ConvertJavaStringToUTF8(
+ app_request->total->amount->value = ConvertJavaStringToUTF8(
env,
Java_ServiceWorkerPaymentAppBridge_getValueFromPaymentItem(env, jtotal));
@@ -164,11 +164,12 @@ static void InvokePaymentApp(JNIEnv* env,
Java_ServiceWorkerPaymentAppBridge_getStringifiedDataFromMethodData(
env, jmodifier_method_data));
- data->modifiers.push_back(std::move(modifier));
+ app_request->modifiers.push_back(std::move(modifier));
}
content::PaymentAppProvider::GetInstance()->InvokePaymentApp(
- web_contents->GetBrowserContext(), registration_id, std::move(data));
+ web_contents->GetBrowserContext(), registration_id,
+ std::move(app_request));
}
bool RegisterServiceWorkerPaymentAppBridge(JNIEnv* env) {
« no previous file with comments | « no previous file | components/payments/payment_app.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698