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_ADDRESSINPUT_UTIL_H_ | 5 #ifndef THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_ |
6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_ | 6 #define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_fi
eld.h" | 10 #include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/addre
ss_field.h" |
11 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_pr
oblem.h" | 11 #include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/addre
ss_problem.h" |
12 | 12 |
13 namespace i18n { | 13 namespace i18n { |
14 namespace addressinput { | 14 namespace addressinput { |
15 struct AddressData; | 15 struct AddressData; |
16 } | 16 } |
17 } | 17 } |
18 | 18 |
19 namespace autofill { | 19 namespace autofill { |
20 namespace addressinput { | 20 namespace addressinput { |
21 | 21 |
22 // Returns true if |address_to_check| has all of its required fields. | 22 // Returns true if |address_to_check| has all of its required fields. |
23 bool HasAllRequiredFields( | 23 bool HasAllRequiredFields( |
24 const ::i18n::addressinput::AddressData& address_to_check); | 24 const ::i18n::addressinput::AddressData& address_to_check); |
25 | 25 |
26 // Validates required fields in |address_to_check| without loading rules from | 26 // Validates required fields in |address_to_check| without loading rules from |
27 // the server. The |problems| parameter cannot be NULL. Does not take ownership | 27 // the server. The |problems| parameter cannot be NULL. Does not take ownership |
28 // of its parameters. | 28 // of its parameters. |
29 // | 29 // |
30 // See documentation of ::i18n::addressinput::AddressValidator::Validate() for | 30 // See documentation of ::i18n::addressinput::AddressValidator::Validate() for |
31 // description of |filter| and |problems|. | 31 // description of |filter| and |problems|. |
32 void ValidateRequiredFields( | 32 void ValidateRequiredFields( |
33 const ::i18n::addressinput::AddressData& address_to_check, | 33 const ::i18n::addressinput::AddressData& address_to_check, |
34 const std::multimap< ::i18n::addressinput::AddressField, | 34 const std::multimap< ::i18n::addressinput::AddressField, |
35 ::i18n::addressinput::AddressProblem>* filter, | 35 ::i18n::addressinput::AddressProblem::Type>* filter, |
36 std::multimap< ::i18n::addressinput::AddressField, | 36 std::multimap< ::i18n::addressinput::AddressField, |
37 ::i18n::addressinput::AddressProblem>* problems); | 37 ::i18n::addressinput::AddressProblem::Type>* problems); |
38 | 38 |
39 } // namespace addressinput | 39 } // namespace addressinput |
40 } // namespace autofill | 40 } // namespace autofill |
41 | 41 |
42 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_ | 42 #endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_ADDRESSINPUT_UTIL_H_ |
OLD | NEW |