| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autofill/form_field.h" | 5 #include "chrome/browser/autofill/form_field.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <string> |
| 9 #include <utility> |
| 10 |
| 11 #include "base/logging.h" |
| 7 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/stringprintf.h" |
| 8 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/autofill/address_field.h" | 15 #include "chrome/browser/autofill/address_field.h" |
| 10 #include "chrome/browser/autofill/autofill_field.h" | 16 #include "chrome/browser/autofill/autofill_field.h" |
| 11 #include "chrome/browser/autofill/credit_card_field.h" | 17 #include "chrome/browser/autofill/credit_card_field.h" |
| 18 #include "chrome/browser/autofill/field_types.h" |
| 19 #include "chrome/browser/autofill/form_structure.h" |
| 12 #include "chrome/browser/autofill/name_field.h" | 20 #include "chrome/browser/autofill/name_field.h" |
| 13 #include "chrome/browser/autofill/phone_field.h" | 21 #include "chrome/browser/autofill/phone_field.h" |
| 14 #include "grit/autofill_resources.h" | 22 #include "grit/autofill_resources.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" |
| 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivit
y.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 18 | 27 |
| 19 // Field names from the ECML specification; see RFC 3106. We've | 28 // Field names from the ECML specification; see RFC 3106. We've |
| 20 // made these names lowercase since we convert labels and field names to | 29 // made these names lowercase since we convert labels and field names to |
| 21 // lowercase before searching. | 30 // lowercase before searching. |
| 22 | 31 |
| 23 // shipping name/address fields | 32 // shipping name/address fields |
| 24 const char kEcmlShipToTitle[] = "ecom_shipto_postal_name_prefix"; | 33 const char kEcmlShipToTitle[] = "ecom_shipto_postal_name_prefix"; |
| 25 const char kEcmlShipToFirstName[] = "ecom_shipto_postal_name_first"; | 34 const char kEcmlShipToFirstName[] = "ecom_shipto_postal_name_first"; |
| 26 const char kEcmlShipToMiddleName[] = "ecom_shipto_postal_name_middle"; | 35 const char kEcmlShipToMiddleName[] = "ecom_shipto_postal_name_middle"; |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (base::strncasecmp(name.c_str(), form_fields[i].name_, | 366 if (base::strncasecmp(name.c_str(), form_fields[i].name_, |
| 358 form_fields[i].length_) == 0) { | 367 form_fields[i].length_) == 0) { |
| 359 return true; | 368 return true; |
| 360 } | 369 } |
| 361 } | 370 } |
| 362 } | 371 } |
| 363 } | 372 } |
| 364 | 373 |
| 365 return false; | 374 return false; |
| 366 } | 375 } |
| OLD | NEW |