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

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

Issue 380713003: PasswordManager - update "password_manager_enabled_" pref name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trybots failure (rebase was needed) Created 6 years, 5 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 0ca48b3d5aba57c8d604ba4d14c71c2ae0d9acaf..85ad67d89ea3e2996a6149177a8c7d4b07707b57 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -62,7 +62,7 @@ const char PasswordManager::kOtherPossibleUsernamesExperiment[] =
void PasswordManager::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
- prefs::kPasswordManagerEnabled,
+ prefs::kPasswordManagerSavingEnabled,
true,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(
@@ -77,10 +77,10 @@ PasswordManager::PasswordManager(PasswordManagerClient* client)
: client_(client), driver_(client->GetDriver()) {
DCHECK(client_);
DCHECK(driver_);
- password_manager_enabled_.Init(prefs::kPasswordManagerEnabled,
+ saving_passwords_enabled_.Init(prefs::kPasswordManagerSavingEnabled,
client_->GetPrefs());
- ReportMetrics(*password_manager_enabled_);
+ ReportMetrics(*saving_passwords_enabled_);
}
PasswordManager::~PasswordManager() {
@@ -117,8 +117,8 @@ bool PasswordManager::IsEnabledForCurrentPage() const {
}
bool PasswordManager::IsSavingEnabledForCurrentPage() const {
- return *password_manager_enabled_ && !driver_->IsOffTheRecord() &&
- IsEnabledForCurrentPage();
+ return *saving_passwords_enabled_ && !driver_->IsOffTheRecord() &&
+ IsEnabledForCurrentPage();
}
void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
@@ -356,7 +356,7 @@ void PasswordManager::CreatePendingLoginManagers(
// Avoid prompting the user for access to a password if they don't have
// password saving enabled.
PasswordStore::AuthorizationPromptPolicy prompt_policy =
- *password_manager_enabled_ ? PasswordStore::ALLOW_PROMPT
+ *saving_passwords_enabled_ ? PasswordStore::ALLOW_PROMPT
: PasswordStore::DISALLOW_PROMPT;
manager->FetchMatchingLoginsFromPasswordStore(prompt_policy);

Powered by Google App Engine
This is Rietveld 408576698