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/autocomplete_history_manager.h" | 5 #include "components/autofill/core/browser/autocomplete_history_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Limit on the number of suggestions to appear in the pop-up menu under an | 29 // Limit on the number of suggestions to appear in the pop-up menu under an |
30 // text input element in a form. | 30 // text input element in a form. |
31 const int kMaxAutocompleteMenuItems = 6; | 31 const int kMaxAutocompleteMenuItems = 6; |
32 | 32 |
33 bool IsTextField(const FormFieldData& field) { | 33 bool IsTextField(const FormFieldData& field) { |
34 return | 34 return |
35 field.form_control_type == "text" || | 35 field.form_control_type == "text" || |
36 field.form_control_type == "search" || | 36 field.form_control_type == "search" || |
37 field.form_control_type == "tel" || | 37 field.form_control_type == "tel" || |
38 field.form_control_type == "url" || | 38 field.form_control_type == "url" || |
39 field.form_control_type == "email" || | 39 field.form_control_type == "email"; |
40 field.form_control_type == "text"; | |
41 } | 40 } |
42 | 41 |
43 } // namespace | 42 } // namespace |
44 | 43 |
45 AutocompleteHistoryManager::AutocompleteHistoryManager( | 44 AutocompleteHistoryManager::AutocompleteHistoryManager( |
46 AutofillDriver* driver, | 45 AutofillDriver* driver, |
47 AutofillManagerDelegate* manager_delegate) | 46 AutofillManagerDelegate* manager_delegate) |
48 : browser_context_(driver->GetWebContents()->GetBrowserContext()), | 47 : browser_context_(driver->GetWebContents()->GetBrowserContext()), |
49 driver_(driver), | 48 driver_(driver), |
50 autofill_data_( | 49 autofill_data_( |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 autofill_unique_ids_); | 196 autofill_unique_ids_); |
198 | 197 |
199 query_id_ = 0; | 198 query_id_ = 0; |
200 autofill_values_.clear(); | 199 autofill_values_.clear(); |
201 autofill_labels_.clear(); | 200 autofill_labels_.clear(); |
202 autofill_icons_.clear(); | 201 autofill_icons_.clear(); |
203 autofill_unique_ids_.clear(); | 202 autofill_unique_ids_.clear(); |
204 } | 203 } |
205 | 204 |
206 } // namespace autofill | 205 } // namespace autofill |
OLD | NEW |