OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/autofill/browser/state_names.h" | 5 #include "components/autofill/browser/state_names.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 | 10 |
11 namespace autofill { | 11 namespace autofill { |
12 namespace state_names { | 12 namespace state_names { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // TODO(jhawkins): Add more states/provinces. See http://crbug.com/45039. | 16 // TODO(jhawkins): Add more states/provinces. See http://crbug.com/45039. |
17 | 17 |
18 struct StateData { | 18 struct StateData { |
19 const char* const name; | 19 const char* const name; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 for (size_t i = 0; i < arraysize(kStateData); ++i) { | 90 for (size_t i = 0; i < arraysize(kStateData); ++i) { |
91 const StateData& state = kStateData[i]; | 91 const StateData& state = kStateData[i]; |
92 if (LowerCaseEqualsASCII(abbreviation, state.abbreviation)) | 92 if (LowerCaseEqualsASCII(abbreviation, state.abbreviation)) |
93 return ASCIIToUTF16(state.name); | 93 return ASCIIToUTF16(state.name); |
94 } | 94 } |
95 return base::string16(); | 95 return base::string16(); |
96 } | 96 } |
97 | 97 |
98 } // namespace state_names | 98 } // namespace state_names |
99 } // namespace autofill | 99 } // namespace autofill |
OLD | NEW |