OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ |
6 #define COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ | 6 #define COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ |
7 | 7 |
8 #include <map> | |
9 #include <memory> | |
10 #include <string> | |
11 #include <vector> | |
please use gerrit instead
2017/03/30 18:48:59
Deleted by mistake?
Parastoo
2017/03/31 15:44:14
Done.
| |
12 | |
13 #include "base/macros.h" | 8 #include "base/macros.h" |
14 #include "third_party/libaddressinput/chromium/chrome_address_validator.h" | 9 #include "third_party/libaddressinput/chromium/chrome_address_validator.h" |
15 | 10 |
16 namespace autofill { | 11 namespace autofill { |
17 class AutofillProfile; | 12 class AutofillProfile; |
18 } | 13 } |
19 | 14 |
20 namespace i18n { | 15 namespace i18n { |
21 namespace libadderssinput { | 16 namespace libadderssinput { |
22 class Source; | 17 class Source; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 // Will start loading the rules for the |region_code| if they had not started | 64 // Will start loading the rules for the |region_code| if they had not started |
70 // loading. | 65 // loading. |
71 void StartAddressNormalization(const autofill::AutofillProfile& profile, | 66 void StartAddressNormalization(const autofill::AutofillProfile& profile, |
72 const std::string& region_code, | 67 const std::string& region_code, |
73 int timeout_seconds, | 68 int timeout_seconds, |
74 Delegate* requester); | 69 Delegate* requester); |
75 | 70 |
76 private: | 71 private: |
77 // Called when the validation rules for the |region_code| have finished | 72 // Called when the validation rules for the |region_code| have finished |
78 // loading. Implementation of the LoadRulesListener interface. | 73 // loading. Implementation of the LoadRulesListener interface. |
79 void OnAddressValidationRulesLoaded(const std::string& region_code, | 74 void OnAddressRulesLoaded(const std::string& region_code, |
80 bool success) override; | 75 bool success) override; |
81 | 76 |
82 // Map associating a region code to pending normalizations. | 77 // Map associating a region code to pending normalizations. |
83 std::map<std::string, std::vector<std::unique_ptr<Request>>> | 78 std::map<std::string, std::vector<std::unique_ptr<Request>>> |
84 pending_normalization_; | 79 pending_normalization_; |
85 | 80 |
86 // The address validator used to normalize addresses. | 81 // The address validator used to normalize addresses. |
87 autofill::AddressValidator address_validator_; | 82 autofill::AddressValidator address_validator_; |
88 | 83 |
89 DISALLOW_COPY_AND_ASSIGN(AddressNormalizer); | 84 DISALLOW_COPY_AND_ASSIGN(AddressNormalizer); |
90 }; | 85 }; |
91 | 86 |
92 } // namespace payments | 87 } // namespace payments |
93 | 88 |
94 #endif // COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ | 89 #endif // COMPONENTS_PAYMENTS_CORE_ADDRESS_NORMALIZER_H_ |
OLD | NEW |