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

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

Issue 344033008: [Password Manager] Disable saving and filling on sync signup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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..0ca48b3d5aba57c8d604ba4d14c71c2ae0d9acaf 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -111,9 +111,14 @@ void PasswordManager::SetFormHasGeneratedPassword(const PasswordForm& form) {
// TODO(gcasto): Add UMA stats to track this.
}
+bool PasswordManager::IsEnabledForCurrentPage() const {
+ return !driver_->DidLastPageLoadEncounterSSLErrors() &&
+ client_->IsPasswordManagerEnabledForCurrentPage();
+}
+
bool PasswordManager::IsSavingEnabledForCurrentPage() const {
return *password_manager_enabled_ && !driver_->IsOffTheRecord() &&
- !driver_->DidLastPageLoadEncounterSSLErrors();
+ IsEnabledForCurrentPage();
}
void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
@@ -318,8 +323,7 @@ void PasswordManager::OnPasswordFormsParsed(
void PasswordManager::CreatePendingLoginManagers(
const std::vector<PasswordForm>& forms) {
- // Don't try to autofill or save passwords in the presence of SSL errors.
- if (driver_->DidLastPageLoadEncounterSSLErrors())
+ if (!IsEnabledForCurrentPage())
return;
// Copy the weak pointers to the currently known login managers for comparison

Powered by Google App Engine
This is Rietveld 408576698