Index: chrome/browser/autofill/android/personal_data_manager_android.h |
diff --git a/chrome/browser/autofill/android/personal_data_manager_android.h b/chrome/browser/autofill/android/personal_data_manager_android.h |
index c2ae27a0b8b8ba1688b29791c0d097b3931ba0df..49abec6c8a882686ea30cd47463195ef1c54aa8e 100644 |
--- a/chrome/browser/autofill/android/personal_data_manager_android.h |
+++ b/chrome/browser/autofill/android/personal_data_manager_android.h |
@@ -141,6 +141,17 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
// Registers the JNI bindings for this class. |
static bool Register(JNIEnv* env); |
+ // These functions act on the usage stats of local profiles and credit cards. |
+ // -------------------- |
+ |
+ // Records the use and log usage metrics for the profile associated with the |
+ // |jguid|. Increments the use count of the profile and sets its use date to |
+ // the current time. |
+ void RecordAndLogProfileUse( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
// Sets the use count and use date of the profile associated to the |jguid|. |
// Both |count| and |date| should be non-negative. |date| represents an |
// absolute point in coordinated universal time (UTC) represented as |
@@ -153,6 +164,29 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
jint count, |
jint date); |
+ // Returns the use count of the profile associated to the |jguid|. |
+ jint GetProfileUseCountForTesting( |
+ JNIEnv* env, |
Bernhard Bauer
2016/07/14 10:14:19
Indent four spaces.
sebsg
2016/07/20 14:56:47
Done.
|
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
+ // Returns the use date of the profile associated to the |jguid|. It |
+ // represents an absolute point in coordinated universal time (UTC) |
+ // represented as microseconds since the Windows epoch. For more details see |
+ // the comment header in time.h. |
+ jlong GetProfileUseDateForTesting( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
+ // Records the use and log usage metrics for the credit card associated with |
+ // the |jguid|. Increments the use count of the credit card and sets its use |
+ // date to the current time. |
+ void RecordAndLogCreditCardUse( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
// Sets the use count and use date of the credit card associated to the |
// |jguid|. Both |count| and |date| should be non-negative. |date| represents |
// an absolute point in coordinated universal time (UTC) represented as |
@@ -165,6 +199,28 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
jint count, |
jint date); |
+ // Returns the use count of the credit card associated to the |jguid|. |
+ jint GetCreditCardUseCountForTesting( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
+ // Returns the use date of the credit card associated to the |jguid|. It |
+ // represents an absolute point in coordinated universal time (UTC) |
+ // represented as microseconds since the Windows epoch. For more details see |
+ // the comment header in time.h. |
+ jlong GetCreditCardUseDateForTesting( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid); |
+ |
+ // Returns the current date represented as an absolute point in coordinated |
+ // universal time (UTC) represented as microseconds since the Windows epoch. |
Bernhard Bauer
2016/07/14 10:14:19
Uh, this is how the time is stored internally, but
sebsg
2016/07/20 14:56:47
I did not use it because it does not seem to be pa
Bernhard Bauer
2016/07/20 15:09:44
Hm, if you want to use time_t, can you at least up
sebsg
2016/07/20 20:30:50
Done.
|
+ // For more details see the comment header in time.h |
+ jlong GetCurrentDateForTesting( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj); |
+ |
private: |
~PersonalDataManagerAndroid() override; |