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

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

Issue 2526943003: [Payments] Remove country from shipping label in bottom and fullsheet. (Closed)
Patch Set: Moved assertion Created 4 years 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 JNIEnv* env, 93 JNIEnv* env,
94 const base::android::JavaParamRef<jobject>& unused_obj, 94 const base::android::JavaParamRef<jobject>& unused_obj,
95 jboolean include_name_in_label, 95 jboolean include_name_in_label,
96 jboolean include_organization_in_label, 96 jboolean include_organization_in_label,
97 jboolean include_country_in_label); 97 jboolean include_country_in_label);
98 98
99 // Returns the shipping label of the given profile for PaymentRequest. This 99 // Returns the shipping label of the given profile for PaymentRequest. This
100 // label does not contain the full name or the email address. All other fields 100 // label does not contain the full name or the email address. All other fields
101 // are included in the label. 101 // are included in the label.
102 base::android::ScopedJavaLocalRef<jstring> 102 base::android::ScopedJavaLocalRef<jstring>
103 GetShippingAddressLabelForPaymentRequest( 103 GetShippingAddressLabelWithCountryForPaymentRequest(
104 JNIEnv* env, 104 JNIEnv* env,
105 const base::android::JavaParamRef<jobject>& unused_obj, 105 const base::android::JavaParamRef<jobject>& unused_obj,
106 const base::android::JavaParamRef<jobject>& jprofile); 106 const base::android::JavaParamRef<jobject>& jprofile);
107
108 // Returns the shipping label of the given profile for PaymentRequest. This
109 // label does not contain the full name, the email address or the country. All
110 // other fields are included in the label.
111 base::android::ScopedJavaLocalRef<jstring>
112 GetShippingAddressLabelWithoutCountryForPaymentRequest(
113 JNIEnv* env,
114 const base::android::JavaParamRef<jobject>& unused_obj,
115 const base::android::JavaParamRef<jobject>& jprofile);
107 116
108 // Returns the billing label of the given profile for PaymentRequest. This 117 // Returns the billing label of the given profile for PaymentRequest. This
109 // label does not contain the company name, the phone number, the country or 118 // label does not contain the company name, the phone number, the country or
110 // the email address. All other fields are included in the label. 119 // the email address. All other fields are included in the label.
111 base::android::ScopedJavaLocalRef<jstring> 120 base::android::ScopedJavaLocalRef<jstring>
112 GetBillingAddressLabelForPaymentRequest( 121 GetBillingAddressLabelForPaymentRequest(
113 JNIEnv* env, 122 JNIEnv* env,
114 const base::android::JavaParamRef<jobject>& unused_obj, 123 const base::android::JavaParamRef<jobject>& unused_obj,
115 const base::android::JavaParamRef<jobject>& jprofile); 124 const base::android::JavaParamRef<jobject>& jprofile);
116 125
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // If |address_only| is true, then such fields as phone number, and email 356 // If |address_only| is true, then such fields as phone number, and email
348 // address are also omitted, but all other fields are included in the label. 357 // address are also omitted, but all other fields are included in the label.
349 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( 358 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels(
350 JNIEnv* env, 359 JNIEnv* env,
351 bool address_only, 360 bool address_only,
352 bool include_name_in_label, 361 bool include_name_in_label,
353 bool include_organization_in_label, 362 bool include_organization_in_label,
354 bool include_country_in_label, 363 bool include_country_in_label,
355 std::vector<AutofillProfile*> profiles); 364 std::vector<AutofillProfile*> profiles);
356 365
366 // Returns the shipping label of the given profile for PaymentRequest. This
367 // label does not contain the full name or the email address but will include
368 // the country depending on the value of |include_country_in_label|. All other
369 // fields are included in the label.
370 base::android::ScopedJavaLocalRef<jstring>
371 GetShippingAddressLabelForPaymentRequest(
372 JNIEnv* env,
373 const base::android::JavaParamRef<jobject>& jprofile,
374 bool inlude_country_in_label);
375
357 // Pointer to the java counterpart. 376 // Pointer to the java counterpart.
358 JavaObjectWeakGlobalRef weak_java_obj_; 377 JavaObjectWeakGlobalRef weak_java_obj_;
359 378
360 // Pointer to the PersonalDataManager for the main profile. 379 // Pointer to the PersonalDataManager for the main profile.
361 PersonalDataManager* personal_data_manager_; 380 PersonalDataManager* personal_data_manager_;
362 381
363 // The address validator used to normalize addresses. 382 // The address validator used to normalize addresses.
364 AddressValidator address_validator_; 383 AddressValidator address_validator_;
365 384
366 // Map associating a region code to pending normalizations. 385 // Map associating a region code to pending normalizations.
367 std::map<std::string, std::vector<std::unique_ptr<Delegate>>> 386 std::map<std::string, std::vector<std::unique_ptr<Delegate>>>
368 pending_normalization_; 387 pending_normalization_;
369 388
370 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); 389 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid);
371 }; 390 };
372 391
373 } // namespace autofill 392 } // namespace autofill
374 393
375 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ 394 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698