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

Unified Diff: chrome/browser/autofill/android/personal_data_manager_android.h

Issue 1982623002: [Autofill] Sort profiles and credit cards by frecency in PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed mathp's comments Created 4 years, 7 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
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..d98620242515371a41506ff1fe075d9a985cf1b8 100644
--- a/chrome/browser/autofill/android/personal_data_manager_android.h
+++ b/chrome/browser/autofill/android/personal_data_manager_android.h
@@ -23,16 +23,11 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver {
// These functions act on "web profiles" aka "LOCAL_PROFILE" profiles.
// -------------------------
- // Returns the number of web and auxiliary profiles.
- 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 to suggest to the user. See
+ // PersonalDataManager::GetProfilesToSuggest for more details.
+ 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
@@ -65,17 +60,11 @@ class PersonalDataManagerAndroid : public PersonalDataManagerObserver {
// These functions act on local credit cards.
// --------------------
- // Returns the number of credit cards.
- jint GetCreditCardCount(
- 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 to suggest to the user. See
+ // PersonalDataManager::GetCreditCardsToSuggest for more details.
+ 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 +106,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|.
please use gerrit instead 2016/05/24 20:21:48 Ditto about |count| and |date| range assumptions a
sebsg 2016/05/24 21:41:22 Done.
+ 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(
please use gerrit instead 2016/05/24 20:21:48 Ditto.
sebsg 2016/05/24 21:41:22 Done.
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& unused_obj,
+ const base::android::JavaParamRef<jstring>& jguid,
+ jint count,
+ jint date);
+
private:
~PersonalDataManagerAndroid() override;

Powered by Google App Engine
This is Rietveld 408576698