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

Side by Side Diff: components/payments/content/android/journey_logger_android.h

Issue 2750103005: [Payments] Move journey logger to native. (Closed)
Patch Set: Nits Created 3 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
7
8 #include <jni.h>
9 #include <memory>
please use gerrit instead 2017/03/24 16:31:46 Not used.
sebsg 2017/03/24 18:37:47 Done.
10
11 #include "base/android/scoped_java_ref.h"
12 #include "base/macros.h"
13 #include "components/payments/core/journey_logger.h"
14
15 namespace payments {
16
17 // Forwarding calls to payments::JourneyLogger.
18 class JourneyLoggerAndroid {
19 public:
20 JourneyLoggerAndroid(JNIEnv* env, jobject unused_obj) {}
please use gerrit instead 2017/03/24 16:31:47 1) Please don't inline constructors and destructor
sebsg 2017/03/24 18:37:46 Done.
21 ~JourneyLoggerAndroid() {}
22
23 // Message from Java to destroy this object.
24 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
please use gerrit instead 2017/03/24 16:31:47 Please rename |obj| to |jcaller|. Also below.
sebsg 2017/03/24 18:37:47 Done.
25
26 void SetNumberOfSuggestionsShown(
27 JNIEnv* env,
28 const base::android::JavaParamRef<jobject>& obj,
29 jint jsection,
30 jint jnumber);
31 void IncrementSelectionChanges(
32 JNIEnv* env,
33 const base::android::JavaParamRef<jobject>& obj,
34 jint jsection);
35 void IncrementSelectionEdits(JNIEnv* env,
36 const base::android::JavaParamRef<jobject>& obj,
37 jint jsection);
38 void IncrementSelectionAdds(JNIEnv* env,
39 const base::android::JavaParamRef<jobject>& obj,
40 jint jsection);
41 void SetCanMakePaymentValue(JNIEnv* env,
42 const base::android::JavaParamRef<jobject>& obj,
43 jboolean jvalue);
44 void SetShowCalled(JNIEnv* env,
45 const base::android::JavaParamRef<jobject>& obj);
46 void RecordJourneyStatsHistograms(
47 JNIEnv* env,
48 const base::android::JavaParamRef<jobject>& obj,
49 const base::android::JavaParamRef<jstring>& jcompletion_status);
50
51 // Registers the JNI bindings for this class.
52 static bool Register(JNIEnv* env);
please use gerrit instead 2017/03/24 16:31:46 Statics should be above constructor.
sebsg 2017/03/24 18:37:47 Done.
53
54 private:
55 JourneyLogger journey_logger_;
56
57 DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid);
58 };
59
60 } // namespace payments
61
62 #endif // COMPONENTS_PAYMENTS_CONTENT_ANDROID_JOURNEY_LOGGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698