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

Side by Side Diff: ios/chrome/browser/payments/payment_request_util.h

Issue 2712053003: [Payment Request] Displays Contact Info in the payment summary view (Closed)
Patch Set: Addressed comments Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "ios/web/public/payments/payment_request.h" 10 #include "ios/web/public/payments/payment_request.h"
11 11
12 namespace autofill { 12 namespace autofill {
13 class AutofillProfile; 13 class AutofillProfile;
14 } // namespace autofill 14 } // namespace autofill
15 15
16 class PaymentRequest; 16 class PaymentRequest;
17 17
18 namespace payment_request_util { 18 namespace payment_request_util {
19 19
20 // Helper function to get the name label from an autofill profile. 20 // Helper function to get the name label from an autofill profile. Returns nil
21 NSString* NameLabelFromAutofillProfile(autofill::AutofillProfile* profile); 21 // if the name field is empty.
22 NSString* GetNameLabelFromAutofillProfile(autofill::AutofillProfile* profile);
22 23
23 // Helper function to get the address label from an autofill profile. 24 // Helper function to get the address label from an autofill profile. Returns
24 NSString* AddressLabelFromAutofillProfile(autofill::AutofillProfile* profile); 25 // nil if the address field is empty.
26 NSString* GetAddressLabelFromAutofillProfile(
27 autofill::AutofillProfile* profile);
25 28
26 // Helper function to get the phone number label from an autofill profile. 29 // Helper function to get the phone number label from an autofill profile.
27 NSString* PhoneNumberLabelFromAutofillProfile( 30 // Returns nil if the phone number field is empty.
31 NSString* GetPhoneNumberLabelFromAutofillProfile(
28 autofill::AutofillProfile* profile); 32 autofill::AutofillProfile* profile);
29 33
34 // Helper function to get the email label from an autofill profile. Returns nil
35 // if the email field is empty.
36 NSString* GetEmailLabelFromAutofillProfile(autofill::AutofillProfile* profile);
37
30 // Helper function to get an instance of web::PaymentAddress from an autofill 38 // Helper function to get an instance of web::PaymentAddress from an autofill
31 // profile. 39 // profile.
32 web::PaymentAddress PaymentAddressFromAutofillProfile( 40 web::PaymentAddress GetPaymentAddressFromAutofillProfile(
33 autofill::AutofillProfile* profile); 41 autofill::AutofillProfile* profile);
34 42
35 // Returns the title for the shipping section of the payment summary view given 43 // Returns the title for the shipping section of the payment summary view given
36 // the shipping type specified in |payment_request|. 44 // the shipping type specified in |payment_request|.
37 NSString* GetShippingSectionTitle(PaymentRequest* payment_request); 45 NSString* GetShippingSectionTitle(PaymentRequest* payment_request);
38 46
39 // Returns the title for the shipping address selection view given the shipping 47 // Returns the title for the shipping address selection view given the shipping
40 // type specified in |payment_request|. 48 // type specified in |payment_request|.
41 NSString* GetShippingAddressSelectorTitle(PaymentRequest* payment_request); 49 NSString* GetShippingAddressSelectorTitle(PaymentRequest* payment_request);
42 50
(...skipping 10 matching lines...) Expand all
53 // type specified in |payment_request|. 61 // type specified in |payment_request|.
54 NSString* GetShippingOptionSelectorTitle(PaymentRequest* payment_request); 62 NSString* GetShippingOptionSelectorTitle(PaymentRequest* payment_request);
55 63
56 // Returns the error message to be displayed in the shipping option selection 64 // Returns the error message to be displayed in the shipping option selection
57 // view given the shipping type specified in |payment_request|. 65 // view given the shipping type specified in |payment_request|.
58 NSString* GetShippingOptionSelectorErrorMessage(PaymentRequest* paymentRequest); 66 NSString* GetShippingOptionSelectorErrorMessage(PaymentRequest* paymentRequest);
59 67
60 } // namespace payment_request_util 68 } // namespace payment_request_util
61 69
62 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_ 70 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698