Chromium Code Reviews| 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(); |