Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chrome/browser/autofill/autocomplete_history_manager.cc

Issue 11198048: [Autofill] Update the autocomplete types implementation to match the current HTML spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: string16 -> std::string and other fixes + cleanup Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698