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

Side by Side Diff: chrome/browser/autofill/android/personal_data_manager_android.h

Issue 2472043003: [Payments] Don't show Organization in billing address selection label. (Closed)
Patch Set: Updated test + Addressed Dan's comment Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Gets the labels for the profiles to suggest to the user. These labels are 79 // Gets the labels for the profiles to suggest to the user. These labels are
80 // useful for distinguishing the profiles from one another. 80 // useful for distinguishing the profiles from one another.
81 // 81 //
82 // The labels never contain the email address, or phone numbers. The 82 // The labels never contain the email address, or phone numbers. The
83 // |include_name_in_label| argument controls whether the name is included. 83 // |include_name_in_label| argument controls whether the name is included.
84 // All other fields are included in the label. 84 // All other fields are included in the label.
85 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsToSuggest( 85 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabelsToSuggest(
86 JNIEnv* env, 86 JNIEnv* env,
87 const base::android::JavaParamRef<jobject>& unused_obj, 87 const base::android::JavaParamRef<jobject>& unused_obj,
88 jboolean include_name_in_label); 88 jboolean include_name_in_label,
89 jboolean include_organization_in_label,
90 jboolean include_country_in_label);
89 91
90 // Returns the label of the given profile for PaymentRequest. This label does 92 // Returns the label of the given profile for PaymentRequest. This label does
91 // not contain the full name or the email address. All other fields are 93 // not contain the full name or the email address. All other fields are
92 // included in the label. 94 // included in the label.
93 base::android::ScopedJavaLocalRef<jstring> GetAddressLabelForPaymentRequest( 95 base::android::ScopedJavaLocalRef<jstring> GetAddressLabelForPaymentRequest(
94 JNIEnv* env, 96 JNIEnv* env,
95 const base::android::JavaParamRef<jobject>& unused_obj, 97 const base::android::JavaParamRef<jobject>& unused_obj,
96 const base::android::JavaParamRef<jobject>& jprofile); 98 const base::android::JavaParamRef<jobject>& jprofile);
97 99
98 // These functions act on local credit cards. 100 // These functions act on local credit cards.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // useful for distinguishing the profiles from one another. 326 // useful for distinguishing the profiles from one another.
325 // 327 //
326 // The labels never contain the full name and include at least 2 fields. 328 // The labels never contain the full name and include at least 2 fields.
327 // 329 //
328 // If |address_only| is true, then such fields as phone number, and email 330 // If |address_only| is true, then such fields as phone number, and email
329 // address are also omitted, but all other fields are included in the label. 331 // address are also omitted, but all other fields are included in the label.
330 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( 332 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels(
331 JNIEnv* env, 333 JNIEnv* env,
332 bool address_only, 334 bool address_only,
333 bool include_name_in_label, 335 bool include_name_in_label,
336 bool include_organization_in_label,
337 bool include_country_in_label,
334 std::vector<AutofillProfile*> profiles); 338 std::vector<AutofillProfile*> profiles);
335 339
336 // Pointer to the java counterpart. 340 // Pointer to the java counterpart.
337 JavaObjectWeakGlobalRef weak_java_obj_; 341 JavaObjectWeakGlobalRef weak_java_obj_;
338 342
339 // Pointer to the PersonalDataManager for the main profile. 343 // Pointer to the PersonalDataManager for the main profile.
340 PersonalDataManager* personal_data_manager_; 344 PersonalDataManager* personal_data_manager_;
341 345
342 // The address validator used to normalize addresses. 346 // The address validator used to normalize addresses.
343 AddressValidator address_validator_; 347 AddressValidator address_validator_;
344 348
345 // Map associating a region code to pending normalizations. 349 // Map associating a region code to pending normalizations.
346 std::map<std::string, std::vector<std::unique_ptr<Delegate>>> 350 std::map<std::string, std::vector<std::unique_ptr<Delegate>>>
347 pending_normalization_; 351 pending_normalization_;
348 352
349 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); 353 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid);
350 }; 354 };
351 355
352 } // namespace autofill 356 } // namespace autofill
353 357
354 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ 358 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698