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

Unified Diff: chrome/browser/autofill/select_control_handler.cc

Issue 6633001: Convert autofill messages to use the new IPC macros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/select_control_handler.cc
===================================================================
--- chrome/browser/autofill/select_control_handler.cc (revision 77285)
+++ chrome/browser/autofill/select_control_handler.cc (working copy)
@@ -125,10 +125,10 @@
string16 value_lowercase = StringToLowerASCII(value);
for (std::vector<string16>::const_iterator iter =
- field->option_strings().begin();
- iter != field->option_strings().end(); ++iter) {
+ field->option_strings.begin();
+ iter != field->option_strings.end(); ++iter) {
if (value_lowercase == StringToLowerASCII(*iter)) {
- field->set_value(*iter);
+ field->value = *iter;
return true;
}
}
@@ -165,13 +165,13 @@
std::string app_locale = AutofillCountry::ApplicationLocale();
for (std::vector<string16>::const_iterator iter =
- field->option_strings().begin();
- iter != field->option_strings().end();
+ field->option_strings.begin();
+ iter != field->option_strings.end();
++iter) {
// Canonicalize each <option> value to a country code, and compare to the
// target country code.
if (country_code == AutofillCountry::GetCountryCode(*iter, app_locale)) {
- field->set_value(*iter);
+ field->value = *iter;
return true;
}
}
@@ -202,30 +202,30 @@
AutofillType type,
webkit_glue::FormField* field) {
DCHECK(field);
- DCHECK_EQ(ASCIIToUTF16("select-one"), field->form_control_type());
+ DCHECK_EQ(ASCIIToUTF16("select-one"), field->form_control_type);
string16 field_text = form_group.GetFieldText(type);
if (field_text.empty())
return;
string16 value;
- for (size_t i = 0; i < field->option_strings().size(); ++i) {
- if (field_text == field->option_strings()[i]) {
+ for (size_t i = 0; i < field->option_strings.size(); ++i) {
+ if (field_text == field->option_strings[i]) {
// An exact match, use it.
value = field_text;
break;
}
- if (StringToLowerASCII(field->option_strings()[i]) ==
+ if (StringToLowerASCII(field->option_strings[i]) ==
StringToLowerASCII(field_text)) {
// A match, but not in the same case. Save it in case an exact match is
// not found.
- value = field->option_strings()[i];
+ value = field->option_strings[i];
}
}
if (!value.empty()) {
- field->set_value(value);
+ field->value = value;
return;
}
« no previous file with comments | « chrome/browser/autofill/select_control_handler.h ('k') | chrome/browser/autofill/select_control_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698