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/content/renderer/form_autofill_util.h" | 5 #include "components/autofill/content/renderer/form_autofill_util.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/stl_util.h" |
13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "build/build_config.h" | 17 #include "build/build_config.h" |
17 #include "components/autofill/core/common/autofill_data_validation.h" | 18 #include "components/autofill/core/common/autofill_data_validation.h" |
18 #include "components/autofill/core/common/autofill_regexes.h" | 19 #include "components/autofill/core/common/autofill_regexes.h" |
19 #include "components/autofill/core/common/autofill_switches.h" | 20 #include "components/autofill/core/common/autofill_switches.h" |
20 #include "components/autofill/core/common/autofill_util.h" | 21 #include "components/autofill/core/common/autofill_util.h" |
21 #include "components/autofill/core/common/form_data.h" | 22 #include "components/autofill/core/common/form_data.h" |
22 #include "components/autofill/core/common/form_field_data.h" | 23 #include "components/autofill/core/common/form_field_data.h" |
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 // Zero selection start is for password manager, which can show usernames | 1802 // Zero selection start is for password manager, which can show usernames |
1802 // that do not begin with the user input value. | 1803 // that do not begin with the user input value. |
1803 selection_start = (offset == base::string16::npos) ? 0 : offset; | 1804 selection_start = (offset == base::string16::npos) ? 0 : offset; |
1804 } | 1805 } |
1805 | 1806 |
1806 input_element->setSelectionRange(selection_start, suggestion.length()); | 1807 input_element->setSelectionRange(selection_start, suggestion.length()); |
1807 } | 1808 } |
1808 | 1809 |
1809 } // namespace form_util | 1810 } // namespace form_util |
1810 } // namespace autofill | 1811 } // namespace autofill |
OLD | NEW |