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

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: Fix tests Created 6 years, 6 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 4c0a4c3bcd07ce80ac680f2213bce96ca25bd886..f339e303681da6cc0d299b6a6014866f0b0af71f 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -110,9 +110,14 @@ void PasswordManager::SetFormHasGeneratedPassword(const PasswordForm& form) {
// TODO(gcasto): Add UMA stats to track this.
}
+bool PasswordManager::IsEnabledForCurrentPage() const {
+ return !driver_->DidLastPageLoadEncounterSSLErrors() &&
+ client_->IsPasswordManagerEnabledForCurrentPage();
vabr (Chromium) 2014/06/24 08:49:49 Should this method check for password_manager_enab
+}
+
bool PasswordManager::IsSavingEnabledForCurrentPage() const {
return *password_manager_enabled_ && !driver_->IsOffTheRecord() &&
- !driver_->DidLastPageLoadEncounterSSLErrors();
+ IsEnabledForCurrentPage();
}
void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
@@ -310,8 +315,7 @@ void PasswordManager::OnPasswordFormSubmitted(
void PasswordManager::OnPasswordFormsParsed(
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;
for (std::vector<PasswordForm>::const_iterator iter = forms.begin();

Powered by Google App Engine
This is Rietveld 408576698