| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 bool FormField::ParseText(std::vector<AutoFillField*>::const_iterator* iter, | 178 bool FormField::ParseText(std::vector<AutoFillField*>::const_iterator* iter, |
| 179 const string16& pattern, | 179 const string16& pattern, |
| 180 AutoFillField** dest) { | 180 AutoFillField** dest) { |
| 181 return ParseText(iter, pattern, dest, false); | 181 return ParseText(iter, pattern, dest, false); |
| 182 } | 182 } |
| 183 | 183 |
| 184 // static | 184 // static |
| 185 bool FormField::ParseEmptyText( | 185 bool FormField::ParseEmptyText( |
| 186 std::vector<AutoFillField*>::const_iterator* iter, | 186 std::vector<AutoFillField*>::const_iterator* iter, |
| 187 AutoFillField** dest) { | 187 AutoFillField** dest) { |
| 188 return ParseLabelAndName(iter, ASCIIToUTF16("^$"), dest); | 188 return ParseLabelText(iter, ASCIIToUTF16("^$"), dest); |
| 189 } | 189 } |
| 190 | 190 |
| 191 // static | 191 // static |
| 192 bool FormField::ParseLabelText( | 192 bool FormField::ParseLabelText( |
| 193 std::vector<AutoFillField*>::const_iterator* iter, | 193 std::vector<AutoFillField*>::const_iterator* iter, |
| 194 const string16& pattern, | 194 const string16& pattern, |
| 195 AutoFillField** dest) { | 195 AutoFillField** dest) { |
| 196 return ParseText(iter, pattern, dest, true); | 196 return ParseText(iter, pattern, dest, true); |
| 197 } | 197 } |
| 198 | 198 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 if (base::strncasecmp(name.c_str(), form_fields[i].name_, | 368 if (base::strncasecmp(name.c_str(), form_fields[i].name_, |
| 369 form_fields[i].length_) == 0) { | 369 form_fields[i].length_) == 0) { |
| 370 return true; | 370 return true; |
| 371 } | 371 } |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 return false; | 376 return false; |
| 377 } | 377 } |
| OLD | NEW |