OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Returns the corresponding Autofill server type for |field|. | 53 // Returns the corresponding Autofill server type for |field|. |
54 ServerFieldType TypeForField(::i18n::addressinput::AddressField field, | 54 ServerFieldType TypeForField(::i18n::addressinput::AddressField field, |
55 common::AddressType address_type); | 55 common::AddressType address_type); |
56 | 56 |
57 // Sets |field| to the corresponding address field for the Autofill | 57 // Sets |field| to the corresponding address field for the Autofill |
58 // |server_type|. Returns |true| if |server_type| can be represented as an | 58 // |server_type|. Returns |true| if |server_type| can be represented as an |
59 // address field. The |field| parameter can be NULL. | 59 // address field. The |field| parameter can be NULL. |
60 bool FieldForType(ServerFieldType server_type, | 60 bool FieldForType(ServerFieldType server_type, |
61 ::i18n::addressinput::AddressField* field); | 61 ::i18n::addressinput::AddressField* field); |
62 | 62 |
63 // Creates an AddressData object for internationalized address display or | |
64 // validation using |get_info| for field values. | |
65 void CreateAddressData( | |
66 const base::Callback<base::string16(const AutofillType&)>& get_info, | |
67 ::i18n::addressinput::AddressData* address_data); | |
68 | |
69 // Whether or not |country_code| has a fully supported address format. | 63 // Whether or not |country_code| has a fully supported address format. |
70 // TODO(dbeam): remove this when filling dependent locality is supported. | 64 // TODO(dbeam): remove this when filling dependent locality is supported. |
71 // http://crbug.com/340929 | 65 // http://crbug.com/340929 |
72 bool CountryIsFullySupported(const std::string& country_code); | 66 bool CountryIsFullySupported(const std::string& country_code); |
73 | 67 |
74 } // namespace i18ninput | 68 } // namespace i18ninput |
75 } // namespace autofill | 69 } // namespace autofill |
76 | 70 |
77 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ | 71 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_I18N_INPUT_H_ |
OLD | NEW |