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/core/browser/address_field.h" | 5 #include "components/autofill/core/browser/address_field.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "components/autofill/core/browser/autofill_field.h" | 14 #include "components/autofill/core/browser/autofill_field.h" |
15 #include "components/autofill/core/browser/autofill_regex_constants.h" | 15 #include "components/autofill/core/browser/autofill_regex_constants.h" |
16 #include "components/autofill/core/browser/autofill_scanner.h" | 16 #include "components/autofill/core/browser/autofill_scanner.h" |
17 #include "components/autofill/core/browser/field_types.h" | 17 #include "components/autofill/core/browser/field_types.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 | 19 |
| 20 using base::UTF8ToUTF16; |
| 21 |
20 namespace autofill { | 22 namespace autofill { |
21 | 23 |
22 FormField* AddressField::Parse(AutofillScanner* scanner) { | 24 FormField* AddressField::Parse(AutofillScanner* scanner) { |
23 if (scanner->IsEnd()) | 25 if (scanner->IsEnd()) |
24 return NULL; | 26 return NULL; |
25 | 27 |
26 scoped_ptr<AddressField> address_field(new AddressField); | 28 scoped_ptr<AddressField> address_field(new AddressField); |
27 const AutofillField* const initial_field = scanner->Cursor(); | 29 const AutofillField* const initial_field = scanner->Cursor(); |
28 size_t saved_cursor = scanner->SaveCursor(); | 30 size_t saved_cursor = scanner->SaveCursor(); |
29 | 31 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (state_) | 223 if (state_) |
222 return false; | 224 return false; |
223 | 225 |
224 return ParseFieldSpecifics(scanner, | 226 return ParseFieldSpecifics(scanner, |
225 UTF8ToUTF16(autofill::kStateRe), | 227 UTF8ToUTF16(autofill::kStateRe), |
226 MATCH_DEFAULT | MATCH_SELECT, | 228 MATCH_DEFAULT | MATCH_SELECT, |
227 &state_); | 229 &state_); |
228 } | 230 } |
229 | 231 |
230 } // namespace autofill | 232 } // namespace autofill |
OLD | NEW |