| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/autofill/address_field.h" | 9 #include "chrome/browser/autofill/address_field.h" |
| 10 #include "chrome/browser/autofill/autofill_field.h" | 10 #include "chrome/browser/autofill/autofill_field.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 return NULL; | 99 return NULL; |
| 100 } | 100 } |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 explicit EmailField(AutoFillField *field) : field_(field) {} | 103 explicit EmailField(AutoFillField *field) : field_(field) {} |
| 104 | 104 |
| 105 AutoFillField* field_; | 105 AutoFillField* field_; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 FormFieldType FormField::GetFormFieldType() const { |
| 109 return kOtherFieldType; |
| 110 } |
| 111 |
| 108 // static | 112 // static |
| 109 bool FormField::Match(AutoFillField* field, | 113 bool FormField::Match(AutoFillField* field, |
| 110 const string16& pattern, | 114 const string16& pattern, |
| 111 bool match_label_only) { | 115 bool match_label_only) { |
| 112 if (match_label_only) { | 116 if (match_label_only) { |
| 113 if (MatchLabel(field, pattern)) { | 117 if (MatchLabel(field, pattern)) { |
| 114 return true; | 118 return true; |
| 115 } | 119 } |
| 116 } else { | 120 } else { |
| 117 // For now, we apply the same pattern to the field's label and the field's | 121 // For now, we apply the same pattern to the field's label and the field's |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 if (base::strncasecmp(name.c_str(), form_fields[i].name_, | 388 if (base::strncasecmp(name.c_str(), form_fields[i].name_, |
| 385 form_fields[i].length_) == 0) { | 389 form_fields[i].length_) == 0) { |
| 386 return true; | 390 return true; |
| 387 } | 391 } |
| 388 } | 392 } |
| 389 } | 393 } |
| 390 } | 394 } |
| 391 | 395 |
| 392 return false; | 396 return false; |
| 393 } | 397 } |
| OLD | NEW |