Chromium Code Reviews| 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 THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ | 5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ |
| 6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ | 6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 // Suggestion: | 128 // Suggestion: |
| 129 // [{dependent_locality: "Zongyang Xian", | 129 // [{dependent_locality: "Zongyang Xian", |
| 130 // locality: "Anqing Shi", | 130 // locality: "Anqing Shi", |
| 131 // administrative_area: "Anhui Sheng"}] | 131 // administrative_area: "Anhui Sheng"}] |
| 132 virtual Status GetSuggestions( | 132 virtual Status GetSuggestions( |
| 133 const ::i18n::addressinput::AddressData& user_input, | 133 const ::i18n::addressinput::AddressData& user_input, |
| 134 ::i18n::addressinput::AddressField focused_field, | 134 ::i18n::addressinput::AddressField focused_field, |
| 135 size_t suggestion_limit, | 135 size_t suggestion_limit, |
| 136 std::vector< ::i18n::addressinput::AddressData>* suggestions) const; | 136 std::vector< ::i18n::addressinput::AddressData>* suggestions) const; |
| 137 | 137 |
| 138 // Canonicalizes the administrative area in |address_data|. For example, | 138 // Normalizwes the administrative area and the locality in |address_data|. For |
|
please use gerrit instead
2016/09/16 22:30:42
s/the administrative area and the locality in/the/
sebsg
2016/09/22 19:50:41
Done.
| |
| 139 // "texas" changes to "TX". Returns true on success, otherwise leaves | 139 // example, "texas" changes to "TX". Returns true on success, otherwise leaves |
| 140 // |address_data| alone and returns false. | 140 // |address_data| alone and returns false. |
| 141 virtual bool CanonicalizeAdministrativeArea( | 141 virtual bool NormalizeAddress( |
| 142 ::i18n::addressinput::AddressData* address) const; | 142 ::i18n::addressinput::AddressData* address) const; |
| 143 | 143 |
| 144 protected: | 144 protected: |
| 145 // Constructor used only for MockAddressValidator. | 145 // Constructor used only for MockAddressValidator. |
| 146 AddressValidator(); | 146 AddressValidator(); |
| 147 | 147 |
| 148 // Returns the period of time to wait between the first attempt's failure and | 148 // Returns the period of time to wait between the first attempt's failure and |
| 149 // the second attempt's initiation to load rules. Exposed for testing. | 149 // the second attempt's initiation to load rules. Exposed for testing. |
| 150 virtual base::TimeDelta GetBaseRetryPeriod() const; | 150 virtual base::TimeDelta GetBaseRetryPeriod() const; |
| 151 | 151 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 // any WeakPtrs to AddressValidator are invalidated before its members | 195 // any WeakPtrs to AddressValidator are invalidated before its members |
| 196 // variable's destructors are executed, rendering them invalid. | 196 // variable's destructors are executed, rendering them invalid. |
| 197 base::WeakPtrFactory<AddressValidator> weak_factory_; | 197 base::WeakPtrFactory<AddressValidator> weak_factory_; |
| 198 | 198 |
| 199 DISALLOW_COPY_AND_ASSIGN(AddressValidator); | 199 DISALLOW_COPY_AND_ASSIGN(AddressValidator); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 } // namespace autofill | 202 } // namespace autofill |
| 203 | 203 |
| 204 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ | 204 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_ADDRESS_VALIDATOR_H_ |
| OLD | NEW |