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

Unified Diff: components/autofill/ios/browser/autofill_field_trial_ios.cc

Issue 1291073005: Update full-form autofill config to always query the field trial state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-flow comment text Created 5 years, 4 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
« no previous file with comments | « base/metrics/field_trial.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/ios/browser/autofill_field_trial_ios.cc
diff --git a/components/autofill/ios/browser/autofill_field_trial_ios.cc b/components/autofill/ios/browser/autofill_field_trial_ios.cc
index 5740f4d1624fcb2e847ac166ff52a28bb1a65db8..56a2d55e352a643a9cdda2f7d39e14791c4320f7 100644
--- a/components/autofill/ios/browser/autofill_field_trial_ios.cc
+++ b/components/autofill/ios/browser/autofill_field_trial_ios.cc
@@ -15,6 +15,11 @@ const char kFullFormFieldTrialName[] = "FullFormAutofill";
// static
bool AutofillFieldTrialIOS::IsFullFormAutofillEnabled() {
+ // Query the field trial state first to ensure that UMA reports the correct
+ // group.
+ std::string field_trial_state =
+ base::FieldTrialList::FindFullName(kFullFormFieldTrialName);
+
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(autofill::switches::kDisableFullFormAutofillIOS))
@@ -22,8 +27,6 @@ bool AutofillFieldTrialIOS::IsFullFormAutofillEnabled() {
if (command_line->HasSwitch(autofill::switches::kEnableFullFormAutofillIOS))
return true;
- std::string field_trial_state =
- base::FieldTrialList::FindFullName(kFullFormFieldTrialName);
return !field_trial_state.empty() && field_trial_state != "Disabled";
}
« no previous file with comments | « base/metrics/field_trial.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698