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

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

Issue 1668523002: [Password Manager] Switch password manager code to use the Feature framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses the review inputs. Created 4 years, 10 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_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index ad3e723f2382147f28515fedf2ec3c9066f000f3..8d3915ba9a52bbe09ee5f62c528880544ddc237a 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -8,7 +8,6 @@
#include <map>
#include <utility>
-#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
@@ -29,8 +28,8 @@
#include "components/password_manager/core/browser/password_manager_driver.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/password_manager_util.h"
+#include "components/password_manager/core/common/password_manager_features.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
-#include "components/password_manager/core/common/password_manager_switches.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
@@ -56,12 +55,13 @@ bool ShouldDropSyncCredential() {
std::string group_name =
base::FieldTrialList::FindFullName("PasswordManagerDropSyncCredential");
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnableDropSyncCredential))
+ if (base::FeatureList::IsEnabled(features::kDropSyncCredential))
return true;
- if (command_line->HasSwitch(switches::kDisableDropSyncCredential))
+ if (password_manager_util::IsFeatureDisabledFromCommandLine(
+ features::kDropSyncCredential)) {
return false;
+ }
// Default to not saving.
return group_name != "Disabled";

Powered by Google App Engine
This is Rietveld 408576698