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

Unified Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 2066703004: Change fill-on-account-select to use Features API, not a custom flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix tests on iOS Created 4 years, 6 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: components/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 934f291a2f90d203890ea0e43dde18b26c0f722a..1d0605503555c61dcbd2cd53d8561131d9996c77 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -12,6 +12,7 @@
#include <utility>
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
@@ -34,6 +35,7 @@
#include "components/password_manager/core/browser/password_manager_util.h"
#include "components/password_manager/core/browser/password_store.h"
#include "components/password_manager/core/browser/statistics_table.h"
+#include "components/password_manager/core/common/password_manager_features.h"
#include "google_apis/gaia/gaia_auth_util.h"
using autofill::FormStructure;
@@ -49,10 +51,6 @@ namespace password_manager {
namespace {
-// Experiment information
-const char kFillOnAccountSelectFieldTrialName[] = "FillOnAccountSelect";
-const char kFillOnAccountSelectFieldTrialEnabledGroup[] = "Enable";
-
PasswordForm CopyAndModifySSLValidity(const PasswordForm& orig,
bool ssl_valid) {
PasswordForm result(orig);
@@ -120,22 +118,8 @@ std::vector<std::unique_ptr<autofill::PasswordForm>> SplitFederatedMatches(
}
bool ShouldShowInitialPasswordAccountSuggestions() {
- std::string group_name =
- base::FieldTrialList::FindFullName(kFillOnAccountSelectFieldTrialName);
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- autofill::switches::kDisableFillOnAccountSelect)) {
- return false;
- }
-
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- autofill::switches::kEnableFillOnAccountSelect)) {
- return true;
- }
-
- return base::StartsWith(group_name,
- kFillOnAccountSelectFieldTrialEnabledGroup,
- base::CompareCase::SENSITIVE);
+ return base::FeatureList::IsEnabled(
+ password_manager::features::kFillOnAccountSelect);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698