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

Unified Diff: components/payments/content/android/journey_logger_android.cc

Issue 2808513002: [Payments] Add PaymentRequest checkout funnel UKMs. (Closed)
Patch Set: Rebase Created 3 years, 8 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 | « components/payments/content/android/journey_logger_android.h ('k') | components/payments/core/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/android/journey_logger_android.cc
diff --git a/components/payments/content/android/journey_logger_android.cc b/components/payments/content/android/journey_logger_android.cc
deleted file mode 100644
index e373ae8253dc6848196c63cac74a59ec9d3df27b..0000000000000000000000000000000000000000
--- a/components/payments/content/android/journey_logger_android.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2017 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 "components/payments/content/android/journey_logger_android.h"
-
-#include "base/android/jni_string.h"
-#include "jni/JourneyLogger_jni.h"
-
-namespace payments {
-namespace {
-
-using ::base::android::JavaParamRef;
-using ::base::android::ConvertJavaStringToUTF8;
-
-} // namespace
-
-// static
-bool JourneyLoggerAndroid::Register(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-JourneyLoggerAndroid::JourneyLoggerAndroid(bool is_incognito)
- : journey_logger_(is_incognito) {}
-
-JourneyLoggerAndroid::~JourneyLoggerAndroid() {}
-
-void JourneyLoggerAndroid::Destroy(JNIEnv* env,
- const JavaParamRef<jobject>& jcaller) {
- delete this;
-}
-
-void JourneyLoggerAndroid::SetNumberOfSuggestionsShown(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jint jsection,
- jint jnumber) {
- DCHECK_GE(jsection, 0);
- DCHECK_LT(jsection, JourneyLogger::Section::SECTION_MAX);
- journey_logger_.SetNumberOfSuggestionsShown(
- static_cast<JourneyLogger::Section>(jsection), jnumber);
-}
-
-void JourneyLoggerAndroid::IncrementSelectionChanges(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jint jsection) {
- DCHECK_GE(jsection, 0);
- DCHECK_LT(jsection, JourneyLogger::Section::SECTION_MAX);
- journey_logger_.IncrementSelectionChanges(
- static_cast<JourneyLogger::Section>(jsection));
-}
-
-void JourneyLoggerAndroid::IncrementSelectionEdits(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jint jsection) {
- DCHECK_GE(jsection, 0);
- DCHECK_LT(jsection, JourneyLogger::Section::SECTION_MAX);
- journey_logger_.IncrementSelectionEdits(
- static_cast<JourneyLogger::Section>(jsection));
-}
-
-void JourneyLoggerAndroid::IncrementSelectionAdds(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jint jsection) {
- DCHECK_GE(jsection, 0);
- DCHECK_LT(jsection, JourneyLogger::Section::SECTION_MAX);
- journey_logger_.IncrementSelectionAdds(
- static_cast<JourneyLogger::Section>(jsection));
-}
-
-void JourneyLoggerAndroid::SetCanMakePaymentValue(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jboolean jvalue) {
- journey_logger_.SetCanMakePaymentValue(jvalue);
-}
-
-void JourneyLoggerAndroid::SetShowCalled(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller) {
- journey_logger_.SetShowCalled();
-}
-
-void JourneyLoggerAndroid::RecordJourneyStatsHistograms(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& jcaller,
- jint jcompletion_status) {
- DCHECK_GE(jcompletion_status, 0);
- DCHECK_LT(jcompletion_status,
- JourneyLogger::CompletionStatus::COMPLETION_STATUS_MAX);
- journey_logger_.RecordJourneyStatsHistograms(
- static_cast<JourneyLogger::CompletionStatus>(jcompletion_status));
-}
-
-static jlong InitJourneyLoggerAndroid(JNIEnv* env,
- const JavaParamRef<jobject>& jcaller,
- jboolean jis_incognito) {
- return reinterpret_cast<jlong>(new JourneyLoggerAndroid(jis_incognito));
-}
-
-} // namespace payments
« no previous file with comments | « components/payments/content/android/journey_logger_android.h ('k') | components/payments/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698