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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // distinguishing the profiles from one another. | 54 // distinguishing the profiles from one another. |
55 // | 55 // |
56 // The labels never contain the full name and include at least 2 fields. | 56 // The labels never contain the full name and include at least 2 fields. |
57 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsForSettings( | 57 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsForSettings( |
58 JNIEnv* env, | 58 JNIEnv* env, |
59 const base::android::JavaParamRef<jobject>& unused_obj); | 59 const base::android::JavaParamRef<jobject>& unused_obj); |
60 | 60 |
61 // Gets the labels for the profiles to suggest to the user. These labels are | 61 // Gets the labels for the profiles to suggest to the user. These labels are |
62 // useful for distinguishing the profiles from one another. | 62 // useful for distinguishing the profiles from one another. |
63 // | 63 // |
64 // The labels never contain the full name, email address, or phone numbers. | 64 // The labels never contain the email address, or phone numbers. The |
65 // All other fields are included in the label. | 65 // |include_name| argument controls whether the name is included. All other |
| 66 // fields are included in the label. |
66 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsToSuggest( | 67 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsToSuggest( |
67 JNIEnv* env, | 68 JNIEnv* env, |
68 const base::android::JavaParamRef<jobject>& unused_obj); | 69 const base::android::JavaParamRef<jobject>& unused_obj, |
| 70 jboolean include_name); |
69 | 71 |
70 // Returns the label of the given profile for PaymentRequest. This label does | 72 // Returns the label of the given profile for PaymentRequest. This label does |
71 // not contain the full name or the email address. All other fields are | 73 // not contain the full name or the email address. All other fields are |
72 // included in the label. | 74 // included in the label. |
73 base::android::ScopedJavaLocalRef<jstring> GetAddressLabelForPaymentRequest( | 75 base::android::ScopedJavaLocalRef<jstring> GetAddressLabelForPaymentRequest( |
74 JNIEnv* env, | 76 JNIEnv* env, |
75 const base::android::JavaParamRef<jobject>& unused_obj, | 77 const base::android::JavaParamRef<jobject>& unused_obj, |
76 const base::android::JavaParamRef<jobject>& jprofile); | 78 const base::android::JavaParamRef<jobject>& jprofile); |
77 | 79 |
78 // These functions act on local credit cards. | 80 // These functions act on local credit cards. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 // Gets the labels for the |profiles| passed as parameters. These labels are | 261 // Gets the labels for the |profiles| passed as parameters. These labels are |
260 // useful for distinguishing the profiles from one another. | 262 // useful for distinguishing the profiles from one another. |
261 // | 263 // |
262 // The labels never contain the full name and include at least 2 fields. | 264 // The labels never contain the full name and include at least 2 fields. |
263 // | 265 // |
264 // If |address_only| is true, then such fields as phone number, and email | 266 // If |address_only| is true, then such fields as phone number, and email |
265 // address are also omitted, but all other fields are included in the label. | 267 // address are also omitted, but all other fields are included in the label. |
266 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( | 268 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( |
267 JNIEnv* env, | 269 JNIEnv* env, |
268 bool address_only, | 270 bool address_only, |
| 271 bool include_name, |
269 std::vector<AutofillProfile*> profiles); | 272 std::vector<AutofillProfile*> profiles); |
270 | 273 |
271 // Pointer to the java counterpart. | 274 // Pointer to the java counterpart. |
272 JavaObjectWeakGlobalRef weak_java_obj_; | 275 JavaObjectWeakGlobalRef weak_java_obj_; |
273 | 276 |
274 // Pointer to the PersonalDataManager for the main profile. | 277 // Pointer to the PersonalDataManager for the main profile. |
275 PersonalDataManager* personal_data_manager_; | 278 PersonalDataManager* personal_data_manager_; |
276 | 279 |
277 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); | 280 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); |
278 }; | 281 }; |
279 | 282 |
280 } // namespace autofill | 283 } // namespace autofill |
281 | 284 |
282 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 285 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
OLD | NEW |