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

Unified Diff: components/password_manager/sync/browser/sync_credentials_filter.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: Fixes mac bot breakages. 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/sync/browser/sync_credentials_filter.cc
diff --git a/components/password_manager/sync/browser/sync_credentials_filter.cc b/components/password_manager/sync/browser/sync_credentials_filter.cc
index 7e9699dd10940ab0c8d8f31b005654ad5a27a863..2e9c62fc5d9798fa9fdce1aa89a00321ab87741e 100644
--- a/components/password_manager/sync/browser/sync_credentials_filter.cc
+++ b/components/password_manager/sync/browser/sync_credentials_filter.cc
@@ -6,12 +6,11 @@
#include <algorithm>
-#include "base/command_line.h"
#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
-#include "components/password_manager/core/common/password_manager_switches.h"
+#include "components/password_manager/core/common/password_manager_features.h"
#include "components/password_manager/sync/browser/password_sync_util.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/url_util.h"
@@ -91,18 +90,19 @@ SyncCredentialsFilter::GetAutofillForSyncCredentialsState() {
std::string group_name =
base::FieldTrialList::FindFullName("AutofillSyncCredential");
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kAllowAutofillSyncCredential))
+ if (base::FeatureList::IsEnabled(features::kAllowAutofillSyncCredential))
return ALLOW_SYNC_CREDENTIALS;
- if (command_line->HasSwitch(
- switches::kDisallowAutofillSyncCredentialForReauth)) {
+
+ if (base::FeatureList::IsEnabled(
+ features::kDisallowAutofillSyncCredentialForReauth))
return DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH;
- }
- if (command_line->HasSwitch(switches::kDisallowAutofillSyncCredential))
+
+ if (base::FeatureList::IsEnabled(features::kDisallowAutofillSyncCredential))
return DISALLOW_SYNC_CREDENTIALS;
if (group_name == "DisallowSyncCredentialsForReauth")
return DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH;
+
if (group_name == "DisallowSyncCredentials")
return DISALLOW_SYNC_CREDENTIALS;

Powered by Google App Engine
This is Rietveld 408576698