| Index: components/payments/content/android/journey_logger_android.h
|
| diff --git a/components/payments/content/android/currency_formatter_android.h b/components/payments/content/android/journey_logger_android.h
|
| similarity index 26%
|
| copy from components/payments/content/android/currency_formatter_android.h
|
| copy to components/payments/content/android/journey_logger_android.h
|
| index 9693c200b83a989119069e818c1f53c7cd81d21d..99acc5bff6fb7293b7a4ae673247ed2665f2ca1e 100644
|
| --- a/components/payments/content/android/currency_formatter_android.h
|
| +++ b/components/payments/content/android/journey_logger_android.h
|
| @@ -2,52 +2,64 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_
|
| -#define COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_
|
| +#ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
|
| +#define COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
|
|
|
| #include <jni.h>
|
| -#include <memory>
|
|
|
| #include "base/android/scoped_java_ref.h"
|
| #include "base/macros.h"
|
| +#include "components/payments/core/journey_logger.h"
|
|
|
| namespace payments {
|
|
|
| -class CurrencyFormatter;
|
| -
|
| -// Forwarding calls to payments::CurrencyFormatter.
|
| -class CurrencyFormatterAndroid {
|
| +// Forwarding calls to payments::JourneyLogger.
|
| +class JourneyLoggerAndroid {
|
| public:
|
| - CurrencyFormatterAndroid(
|
| - JNIEnv* env,
|
| - jobject unused_obj,
|
| - const base::android::JavaParamRef<jstring>& currency_code,
|
| - const base::android::JavaParamRef<jstring>& currency_system,
|
| - const base::android::JavaParamRef<jstring>& locale_name);
|
| - ~CurrencyFormatterAndroid();
|
| + // Registers the JNI bindings for this class.
|
| + static bool Register(JNIEnv* env);
|
| +
|
| + JourneyLoggerAndroid();
|
| + ~JourneyLoggerAndroid();
|
|
|
| // Message from Java to destroy this object.
|
| - void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
|
| + void Destroy(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller);
|
|
|
| - // Refer to CurrencyFormatter::Format documentation.
|
| - base::android::ScopedJavaLocalRef<jstring> Format(
|
| + void SetNumberOfSuggestionsShown(
|
| JNIEnv* env,
|
| - const base::android::JavaParamRef<jobject>& unused_obj,
|
| - const base::android::JavaParamRef<jstring>& amount);
|
| -
|
| - base::android::ScopedJavaLocalRef<jstring> GetFormattedCurrencyCode(
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jint jsection,
|
| + jint jnumber);
|
| + void IncrementSelectionChanges(
|
| JNIEnv* env,
|
| - const base::android::JavaParamRef<jobject>& unused_obj);
|
| -
|
| - // Registers the JNI bindings for this class.
|
| - static bool Register(JNIEnv* env);
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jint jsection);
|
| + void IncrementSelectionEdits(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jint jsection);
|
| + void IncrementSelectionAdds(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jint jsection);
|
| + void SetCanMakePaymentValue(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jboolean jvalue);
|
| + void SetShowCalled(JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller);
|
| + void RecordJourneyStatsHistograms(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller,
|
| + jint jcompletion_status);
|
|
|
| private:
|
| - std::unique_ptr<CurrencyFormatter> currency_formatter_;
|
| + JourneyLogger journey_logger_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(CurrencyFormatterAndroid);
|
| + DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid);
|
| };
|
|
|
| } // namespace payments
|
|
|
| -#endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_CURRENCY_FORMATTER_ANDROID_H_
|
| +#endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
|
|
|