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 2d1208822ed6cb72982a480846b4c08b91441888..d35b8890589c3ba8af1ef8be1b99dc679b94563c 100644 |
--- a/chrome/browser/autofill/android/personal_data_manager_android.h |
+++ b/chrome/browser/autofill/android/personal_data_manager_android.h |
@@ -27,12 +27,11 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
jint GetProfileCount(JNIEnv* unused_env, |
const base::android::JavaParamRef<jobject>& unused_obj); |
- // Returns the profile as indexed by |index| in the PersonalDataManager's |
- // |GetProfiles()| collection. |
- base::android::ScopedJavaLocalRef<jobject> GetProfileByIndex( |
+ // Returns the GUIDs of the profiles that should be suggested to the user. The |
+ // profiles are already sorted by frecency. |
+ base::android::ScopedJavaLocalRef<jobjectArray> GetProfileGUIDsToSuggest( |
JNIEnv* env, |
- const base::android::JavaParamRef<jobject>& unused_obj, |
- jint index); |
+ const base::android::JavaParamRef<jobject>& unused_obj); |
// Returns the profile with the specified |jguid|, or NULL if there is no |
// profile with the specified |jguid|. Both web and auxiliary profiles may |
@@ -70,12 +69,12 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
JNIEnv* unused_env, |
const base::android::JavaParamRef<jobject>& unused_obj); |
- // Returns the credit card as indexed by |index| in the PersonalDataManager's |
- // |GetCreditCards()| collection. |
- base::android::ScopedJavaLocalRef<jobject> GetCreditCardByIndex( |
+ // Returns the GUIDs of the credit cards that should be suggested to the |
+ // user. The cards are already deduped and sorted by frecency with the |
Mathieu
2016/05/20 13:57:08
nit: I wouldn't make implementation specific comme
sebsg
2016/05/24 17:27:32
Good point.
|
+ // expired cards last. |
+ base::android::ScopedJavaLocalRef<jobjectArray> GetCreditCardGUIDsToSuggest( |
JNIEnv* env, |
- const base::android::JavaParamRef<jobject>& unused_obj, |
- jint index); |
+ const base::android::JavaParamRef<jobject>& unused_ob); |
// Returns the credit card with the specified |jguid|, or NULL if there is |
// no credit card with the specified |jguid|. |
@@ -117,6 +116,23 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
// Registers the JNI bindings for this class. |
static bool Register(JNIEnv* env); |
+ // Sets the use count and use date of the profile associated to the |jguid|. |
+ void SetProfileUseStatsForTest( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid, |
+ jint count, |
+ jint date); |
+ |
+ // Sets the use count and use date of the credit card associated to the |
+ // |jguid|. |
+ void SetCreditCardUseStatsForTest( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& unused_obj, |
+ const base::android::JavaParamRef<jstring>& jguid, |
+ jint count, |
+ jint date); |
+ |
private: |
~PersonalDataManagerAndroid() override; |