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

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: 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 c6b1747a467328adcf65f9aa91b282fef7852e80..a52ccbd6205f66905b96b0d6e9f34aa97172efe5 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,
- client_->GetPrefs());
+ saving_password_enabled_.Init(prefs::kPasswordManagerSavingEnabled,
+ client_->GetPrefs());
- ReportMetrics(*password_manager_enabled_);
+ ReportMetrics(*saving_password_enabled_);
}
PasswordManager::~PasswordManager() {
@@ -112,7 +112,7 @@ void PasswordManager::SetFormHasGeneratedPassword(const PasswordForm& form) {
}
bool PasswordManager::IsSavingEnabledForCurrentPage() const {
- return *password_manager_enabled_ && !driver_->IsOffTheRecord() &&
+ return *saving_password_enabled_ && !driver_->IsOffTheRecord() &&
!driver_->DidLastPageLoadEncounterSSLErrors();
}
@@ -352,8 +352,8 @@ 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
- : PasswordStore::DISALLOW_PROMPT;
+ *saving_password_enabled_ ? PasswordStore::ALLOW_PROMPT
+ : PasswordStore::DISALLOW_PROMPT;
manager->FetchMatchingLoginsFromPasswordStore(prompt_policy);
}

Powered by Google App Engine
This is Rietveld 408576698