| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Adds or modifies a profile. If |jguid| is an empty string, we are creating | 45 // Adds or modifies a profile. If |jguid| is an empty string, we are creating |
| 46 // a new profile. Else we are updating an existing profile. Always returns | 46 // a new profile. Else we are updating an existing profile. Always returns |
| 47 // the GUID for this profile; the GUID it may have just been created. | 47 // the GUID for this profile; the GUID it may have just been created. |
| 48 base::android::ScopedJavaLocalRef<jstring> SetProfile( | 48 base::android::ScopedJavaLocalRef<jstring> SetProfile( |
| 49 JNIEnv* env, | 49 JNIEnv* env, |
| 50 const base::android::JavaParamRef<jobject>& unused_obj, | 50 const base::android::JavaParamRef<jobject>& unused_obj, |
| 51 const base::android::JavaParamRef<jobject>& jprofile); | 51 const base::android::JavaParamRef<jobject>& jprofile); |
| 52 | 52 |
| 53 // Gets the labels for all known profiles. These labels are useful for | 53 // Gets the labels for all known profiles. These labels are useful for |
| 54 // distinguishing the profiles from one another. | 54 // distinguishing the profiles from one another. |
| 55 // | |
| 56 // The labels never contain the full name and include at least 2 fields. | |
| 57 // | |
| 58 // If |address_only| is true, then such fields as phone number and email | |
| 59 // address are also omitted, but all fields are included in the label. | |
| 60 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( | 55 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( |
| 61 JNIEnv* env, | 56 JNIEnv* env, |
| 62 const base::android::JavaParamRef<jobject>& unused_obj, | 57 const base::android::JavaParamRef<jobject>& unused_obj); |
| 63 bool address_only); | |
| 64 | 58 |
| 65 // These functions act on local credit cards. | 59 // These functions act on local credit cards. |
| 66 // -------------------- | 60 // -------------------- |
| 67 | 61 |
| 68 // Returns the number of credit cards. | 62 // Returns the number of credit cards. |
| 69 jint GetCreditCardCount( | 63 jint GetCreditCardCount( |
| 70 JNIEnv* unused_env, | 64 JNIEnv* unused_env, |
| 71 const base::android::JavaParamRef<jobject>& unused_obj); | 65 const base::android::JavaParamRef<jobject>& unused_obj); |
| 72 | 66 |
| 73 // Returns the credit card as indexed by |index| in the PersonalDataManager's | 67 // Returns the credit card as indexed by |index| in the PersonalDataManager's |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 119 |
| 126 // Pointer to the PersonalDataManager for the main profile. | 120 // Pointer to the PersonalDataManager for the main profile. |
| 127 PersonalDataManager* personal_data_manager_; | 121 PersonalDataManager* personal_data_manager_; |
| 128 | 122 |
| 129 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); | 123 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); |
| 130 }; | 124 }; |
| 131 | 125 |
| 132 } // namespace autofill | 126 } // namespace autofill |
| 133 | 127 |
| 134 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 128 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| OLD | NEW |