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

Unified Diff: components/password_manager/core/browser/password_store_factory_util.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: Changes to fieldtrial_testing_config_*.json 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_store_factory_util.cc
diff --git a/components/password_manager/core/browser/password_store_factory_util.cc b/components/password_manager/core/browser/password_store_factory_util.cc
index 5f6eb805abf6dd9b93f6569ff880e8a6e54ac4f1..d141fa9bdb6ee74a81cbc278619ac62948909dec 100644
--- a/components/password_manager/core/browser/password_store_factory_util.cc
+++ b/components/password_manager/core/browser/password_store_factory_util.cc
@@ -6,11 +6,11 @@
#include <utility>
-#include "base/command_line.h"
#include "components/password_manager/core/browser/affiliated_match_helper.h"
#include "components/password_manager/core/browser/affiliation_service.h"
#include "components/password_manager/core/browser/affiliation_utils.h"
#include "components/password_manager/core/browser/password_manager_constants.h"
+#include "components/password_manager/core/common/password_manager_features.h"
namespace password_manager {
@@ -18,11 +18,8 @@ namespace {
bool ShouldAffiliationBasedMatchingBeActive(
sync_driver::SyncService* sync_service) {
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (!IsAffiliationBasedMatchingEnabled(*command_line))
- return false;
-
- return sync_service && sync_service->CanSyncStart() &&
+ return base::FeatureList::IsEnabled(features::kAffiliationBasedMatching) &&
+ sync_service && sync_service->CanSyncStart() &&
sync_service->IsSyncActive() &&
sync_service->GetPreferredDataTypes().Has(syncer::PASSWORDS) &&
!sync_service->IsUsingSecondaryPassphrase();
@@ -46,8 +43,7 @@ void ActivateAffiliationBasedMatching(
password_store->SetAffiliatedMatchHelper(std::move(affiliated_match_helper));
password_store->enable_propagating_password_changes_to_web_credentials(
- IsPropagatingPasswordChangesToWebCredentialsEnabled(
- *base::CommandLine::ForCurrentProcess()));
+ base::FeatureList::IsEnabled(features::kAffiliationBasedMatching));
}
base::FilePath GetAffiliationDatabasePath(const base::FilePath& profile_path) {

Powered by Google App Engine
This is Rietveld 408576698