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

Side by Side Diff: chrome/browser/payments/android/journey_logger_android.cc

Issue 2923243003: Merge-60 [Payments] Move the RequestedInformation metric to native. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chrome/browser/payments/android/journey_logger_android.h" 5 #include "chrome/browser/payments/android/journey_logger_android.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "jni/JourneyLogger_jni.h" 9 #include "jni/JourneyLogger_jni.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 JNIEnv* env, 102 JNIEnv* env,
103 const base::android::JavaParamRef<jobject>& jcaller, 103 const base::android::JavaParamRef<jobject>& jcaller,
104 jint jpayment_method) { 104 jint jpayment_method) {
105 DCHECK_GE(jpayment_method, 0); 105 DCHECK_GE(jpayment_method, 0);
106 DCHECK_LT(jpayment_method, 106 DCHECK_LT(jpayment_method,
107 JourneyLogger::SelectedPaymentMethod::SELECTED_PAYMENT_METHOD_MAX); 107 JourneyLogger::SelectedPaymentMethod::SELECTED_PAYMENT_METHOD_MAX);
108 journey_logger_.SetSelectedPaymentMethod( 108 journey_logger_.SetSelectedPaymentMethod(
109 static_cast<JourneyLogger::SelectedPaymentMethod>(jpayment_method)); 109 static_cast<JourneyLogger::SelectedPaymentMethod>(jpayment_method));
110 } 110 }
111 111
112 void JourneyLoggerAndroid::SetRequestedInformation(
113 JNIEnv* env,
114 const base::android::JavaParamRef<jobject>& jcaller,
115 jboolean requested_shipping,
116 jboolean requested_email,
117 jboolean requested_phone,
118 jboolean requested_name) {
119 journey_logger_.SetRequestedInformation(requested_shipping, requested_email,
120 requested_phone, requested_name);
121 }
122
112 void JourneyLoggerAndroid::SetCompleted( 123 void JourneyLoggerAndroid::SetCompleted(
113 JNIEnv* env, 124 JNIEnv* env,
114 const base::android::JavaParamRef<jobject>& jcaller) { 125 const base::android::JavaParamRef<jobject>& jcaller) {
115 journey_logger_.SetCompleted(); 126 journey_logger_.SetCompleted();
116 } 127 }
117 128
118 void JourneyLoggerAndroid::SetAborted( 129 void JourneyLoggerAndroid::SetAborted(
119 JNIEnv* env, 130 JNIEnv* env,
120 const base::android::JavaParamRef<jobject>& jcaller, 131 const base::android::JavaParamRef<jobject>& jcaller,
121 jint jreason) { 132 jint jreason) {
(...skipping 15 matching lines...) Expand all
137 static jlong InitJourneyLoggerAndroid( 148 static jlong InitJourneyLoggerAndroid(
138 JNIEnv* env, 149 JNIEnv* env,
139 const JavaParamRef<jobject>& jcaller, 150 const JavaParamRef<jobject>& jcaller,
140 jboolean jis_incognito, 151 jboolean jis_incognito,
141 const base::android::JavaParamRef<jstring>& jurl) { 152 const base::android::JavaParamRef<jstring>& jurl) {
142 return reinterpret_cast<jlong>(new JourneyLoggerAndroid( 153 return reinterpret_cast<jlong>(new JourneyLoggerAndroid(
143 jis_incognito, ConvertJavaStringToUTF8(env, jurl))); 154 jis_incognito, ConvertJavaStringToUTF8(env, jurl)));
144 } 155 }
145 156
146 } // namespace payments 157 } // namespace payments
OLDNEW
« no previous file with comments | « chrome/browser/payments/android/journey_logger_android.h ('k') | components/payments/core/journey_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698