| 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/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 &serial) | 91 &serial) |
| 92 || serial == 0) { | 92 || serial == 0) { |
| 93 return false; | 93 return false; |
| 94 } | 94 } |
| 95 | 95 |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool IsTextField(const FormFieldData& field) { | 99 bool IsTextField(const FormFieldData& field) { |
| 100 return | 100 return |
| 101 field.form_control_type == ASCIIToUTF16("text") || | 101 field.form_control_type == "text" || |
| 102 field.form_control_type == ASCIIToUTF16("search") || | 102 field.form_control_type == "search" || |
| 103 field.form_control_type == ASCIIToUTF16("tel") || | 103 field.form_control_type == "tel" || |
| 104 field.form_control_type == ASCIIToUTF16("url") || | 104 field.form_control_type == "url" || |
| 105 field.form_control_type == ASCIIToUTF16("email") || | 105 field.form_control_type == "email" || |
| 106 field.form_control_type == ASCIIToUTF16("text"); | 106 field.form_control_type == "text"; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace | 109 } // namespace |
| 110 | 110 |
| 111 AutocompleteHistoryManager::AutocompleteHistoryManager( | 111 AutocompleteHistoryManager::AutocompleteHistoryManager( |
| 112 WebContents* web_contents) | 112 WebContents* web_contents) |
| 113 : content::WebContentsObserver(web_contents), | 113 : content::WebContentsObserver(web_contents), |
| 114 pending_query_handle_(0), | 114 pending_query_handle_(0), |
| 115 query_id_(0), | 115 query_id_(0), |
| 116 external_delegate_(NULL) { | 116 external_delegate_(NULL) { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 autofill_icons_, | 297 autofill_icons_, |
| 298 autofill_unique_ids_)); | 298 autofill_unique_ids_)); |
| 299 } | 299 } |
| 300 | 300 |
| 301 query_id_ = 0; | 301 query_id_ = 0; |
| 302 autofill_values_.clear(); | 302 autofill_values_.clear(); |
| 303 autofill_labels_.clear(); | 303 autofill_labels_.clear(); |
| 304 autofill_icons_.clear(); | 304 autofill_icons_.clear(); |
| 305 autofill_unique_ids_.clear(); | 305 autofill_unique_ids_.clear(); |
| 306 } | 306 } |
| OLD | NEW |