OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autocomplete_history_manager.h" | 5 #include "chrome/browser/autofill/autocomplete_history_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/prefs/public/pref_service_base.h" | 9 #include "base/prefs/public/pref_service_base.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 &serial) | 89 &serial) |
90 || serial == 0) { | 90 || serial == 0) { |
91 return false; | 91 return false; |
92 } | 92 } |
93 | 93 |
94 return true; | 94 return true; |
95 } | 95 } |
96 | 96 |
97 bool IsTextField(const FormFieldData& field) { | 97 bool IsTextField(const FormFieldData& field) { |
98 return | 98 return |
99 field.form_control_type == ASCIIToUTF16("text") || | 99 field.form_control_type == "text" || |
100 field.form_control_type == ASCIIToUTF16("search") || | 100 field.form_control_type == "search" || |
101 field.form_control_type == ASCIIToUTF16("tel") || | 101 field.form_control_type == "tel" || |
102 field.form_control_type == ASCIIToUTF16("url") || | 102 field.form_control_type == "url" || |
103 field.form_control_type == ASCIIToUTF16("email") || | 103 field.form_control_type == "email" || |
104 field.form_control_type == ASCIIToUTF16("text"); | 104 field.form_control_type == "text"; |
105 } | 105 } |
106 | 106 |
107 } // namespace | 107 } // namespace |
108 | 108 |
109 AutocompleteHistoryManager::AutocompleteHistoryManager( | 109 AutocompleteHistoryManager::AutocompleteHistoryManager( |
110 WebContents* web_contents) | 110 WebContents* web_contents) |
111 : content::WebContentsObserver(web_contents), | 111 : content::WebContentsObserver(web_contents), |
112 pending_query_handle_(0), | 112 pending_query_handle_(0), |
113 query_id_(0), | 113 query_id_(0), |
114 external_delegate_(NULL) { | 114 external_delegate_(NULL) { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 autofill_icons_, | 295 autofill_icons_, |
296 autofill_unique_ids_)); | 296 autofill_unique_ids_)); |
297 } | 297 } |
298 | 298 |
299 query_id_ = 0; | 299 query_id_ = 0; |
300 autofill_values_.clear(); | 300 autofill_values_.clear(); |
301 autofill_labels_.clear(); | 301 autofill_labels_.clear(); |
302 autofill_icons_.clear(); | 302 autofill_icons_.clear(); |
303 autofill_unique_ids_.clear(); | 303 autofill_unique_ids_.clear(); |
304 } | 304 } |
OLD | NEW |