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

Unified Diff: components/autofill/core/browser/autofill_field.cc

Issue 796993002: Turn on cardholder/recipient name disambiguation by default. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/autofill/core/common/autofill_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_field.cc
diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc
index bc1a4349b17ed567846618d07ab40a2ca38298b3..75a0d0a4220a61e4f8f9c92a523bbb12363974cf 100644
--- a/components/autofill/core/browser/autofill_field.cc
+++ b/components/autofill/core/browser/autofill_field.cc
@@ -42,23 +42,6 @@ const char* const kMonthsFull[] = {
"July", "August", "September", "October", "November", "December",
};
-bool ShouldDisambiguateServerNameTypes() {
- std::string group_name =
- base::FieldTrialList::FindFullName("DisambiguateAutofillServerNameTypes");
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisambiguateAutofillServerNameTypes)) {
- return true;
- }
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kTrustAutofillServerNameTypes)) {
- return false;
- }
-
- return group_name == "Enabled";
-}
-
// Returns true if the value was successfully set, meaning |value| was found in
// the list of select options in |field|.
bool SetSelectControlValue(const base::string16& value,
@@ -474,12 +457,13 @@ AutofillType AutofillField::Type() const {
return AutofillType(html_type_, html_mode_);
if (server_type_ != NO_SERVER_DATA) {
- bool believe_server = true;
- if (ShouldDisambiguateServerNameTypes()) {
- believe_server =
- !(server_type_ == NAME_FULL && heuristic_type_ == CREDIT_CARD_NAME) &&
- !(server_type_ == CREDIT_CARD_NAME && heuristic_type_ == NAME_FULL);
- }
+ // See http://crbug.com/429236 for background on why we might not always
+ // believe the server.
+ // See http://crbug.com/441488 for potential improvements to the server
+ // which may obviate the need for this logic.
+ bool believe_server =
+ !(server_type_ == NAME_FULL && heuristic_type_ == CREDIT_CARD_NAME) &&
+ !(server_type_ == CREDIT_CARD_NAME && heuristic_type_ == NAME_FULL);
if (believe_server)
return AutofillType(server_type_);
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/autofill/core/common/autofill_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698