| 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/form_structure.h" | 5 #include "components/autofill/core/browser/form_structure.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 if (active_field_count() < kRequiredFieldsForPredictionRoutines && | 598 if (active_field_count() < kRequiredFieldsForPredictionRoutines && |
| 599 (!all_fields_are_passwords() || | 599 (!all_fields_are_passwords() || |
| 600 active_field_count() < kRequiredFieldsForFormsWithOnlyPasswordFields) && | 600 active_field_count() < kRequiredFieldsForFormsWithOnlyPasswordFields) && |
| 601 !has_author_specified_types_) { | 601 !has_author_specified_types_) { |
| 602 return false; | 602 return false; |
| 603 } | 603 } |
| 604 | 604 |
| 605 // Rule out http(s)://*/search?... | 605 // Rule out http(s)://*/search?... |
| 606 // e.g. http://www.google.com/search?q=... | 606 // e.g. http://www.google.com/search?q=... |
| 607 // http://search.yahoo.com/search?p=... | 607 // http://search.yahoo.com/search?p=... |
| 608 if (target_url_.path() == "/search") | 608 if (target_url_.path_piece() == "/search") |
| 609 return false; | 609 return false; |
| 610 | 610 |
| 611 bool has_text_field = false; | 611 bool has_text_field = false; |
| 612 for (const AutofillField* it : *this) { | 612 for (const AutofillField* it : *this) { |
| 613 has_text_field |= it->form_control_type != "select-one"; | 613 has_text_field |= it->form_control_type != "select-one"; |
| 614 } | 614 } |
| 615 | 615 |
| 616 return has_text_field; | 616 return has_text_field; |
| 617 } | 617 } |
| 618 | 618 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 filtered_strings[0].at(prefix_len)) { | 1315 filtered_strings[0].at(prefix_len)) { |
| 1316 // Mismatch found. | 1316 // Mismatch found. |
| 1317 return filtered_strings[i].substr(0, prefix_len); | 1317 return filtered_strings[i].substr(0, prefix_len); |
| 1318 } | 1318 } |
| 1319 } | 1319 } |
| 1320 } | 1320 } |
| 1321 return filtered_strings[0]; | 1321 return filtered_strings[0]; |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 } // namespace autofill | 1324 } // namespace autofill |
| OLD | NEW |