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

Side by Side Diff: components/autofill/core/browser/form_structure.cc

Issue 762723003: Prefix CommandLine usage with base namespace (Part 8: components) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
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/form_structure.h" 5 #include "components/autofill/core/browser/form_structure.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 if (autocomplete_attribute_value == "country-name") 240 if (autocomplete_attribute_value == "country-name")
241 return HTML_TYPE_COUNTRY_NAME; 241 return HTML_TYPE_COUNTRY_NAME;
242 242
243 if (autocomplete_attribute_value == "postal-code") 243 if (autocomplete_attribute_value == "postal-code")
244 return HTML_TYPE_POSTAL_CODE; 244 return HTML_TYPE_POSTAL_CODE;
245 245
246 // content_switches.h isn't accessible from here, hence we have 246 // content_switches.h isn't accessible from here, hence we have
247 // to copy the string literal. This should be removed soon anyway. 247 // to copy the string literal. This should be removed soon anyway.
248 if (autocomplete_attribute_value == "address" && 248 if (autocomplete_attribute_value == "address" &&
249 CommandLine::ForCurrentProcess()->HasSwitch( 249 base::CommandLine::ForCurrentProcess()->HasSwitch(
250 "enable-experimental-web-platform-features")) { 250 "enable-experimental-web-platform-features")) {
251 return HTML_TYPE_FULL_ADDRESS; 251 return HTML_TYPE_FULL_ADDRESS;
252 } 252 }
253 253
254 if (autocomplete_attribute_value == "cc-name") 254 if (autocomplete_attribute_value == "cc-name")
255 return HTML_TYPE_CREDIT_CARD_NAME; 255 return HTML_TYPE_CREDIT_CARD_NAME;
256 256
257 if (autocomplete_attribute_value == "cc-number") 257 if (autocomplete_attribute_value == "cc-number")
258 return HTML_TYPE_CREDIT_CARD_NUMBER; 258 return HTML_TYPE_CREDIT_CARD_NUMBER;
259 259
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 for (AutofillField* field : fields_) { 1246 for (AutofillField* field : fields_) {
1247 FieldTypeGroup field_type_group = field->Type().group(); 1247 FieldTypeGroup field_type_group = field->Type().group();
1248 if (field_type_group == CREDIT_CARD) 1248 if (field_type_group == CREDIT_CARD)
1249 field->set_section(field->section() + "-cc"); 1249 field->set_section(field->section() + "-cc");
1250 else 1250 else
1251 field->set_section(field->section() + "-default"); 1251 field->set_section(field->section() + "-default");
1252 } 1252 }
1253 } 1253 }
1254 1254
1255 } // namespace autofill 1255 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698