| Index: components/password_manager/content/browser/credential_manager_dispatcher.cc
|
| diff --git a/components/password_manager/content/browser/credential_manager_dispatcher.cc b/components/password_manager/content/browser/credential_manager_dispatcher.cc
|
| index 8d20793c37bd2f03ac8295590114d1b35d7b8ddc..2ab09477b4cbfa85491c661123a1932194ab93e0 100644
|
| --- a/components/password_manager/content/browser/credential_manager_dispatcher.cc
|
| +++ b/components/password_manager/content/browser/credential_manager_dispatcher.cc
|
| @@ -220,7 +220,7 @@ void CredentialManagerDispatcher::OnNotifySignedIn(
|
| new CredentialManagerMsg_AcknowledgeSignedIn(
|
| web_contents()->GetRenderViewHost()->GetRoutingID(), request_id));
|
|
|
| - if (!IsSavingEnabledForCurrentPage())
|
| + if (!client_->IsSavingEnabledForCurrentPage())
|
| return;
|
|
|
| scoped_ptr<autofill::PasswordForm> form(CreatePasswordFormFromCredentialInfo(
|
| @@ -236,8 +236,11 @@ void CredentialManagerDispatcher::OnNotifySignedIn(
|
|
|
| void CredentialManagerDispatcher::OnProvisionalSaveComplete() {
|
| DCHECK(form_manager_);
|
| - client_->PromptUserToSavePassword(
|
| - form_manager_.Pass(), CredentialSourceType::CREDENTIAL_SOURCE_API);
|
| + if (client_->IsSavingEnabledForCurrentPage() &&
|
| + !form_manager_->IsBlacklisted()) {
|
| + client_->PromptUserToSavePassword(
|
| + form_manager_.Pass(), CredentialSourceType::CREDENTIAL_SOURCE_API);
|
| + }
|
| }
|
|
|
| void CredentialManagerDispatcher::OnNotifySignedOut(int request_id) {
|
| @@ -301,11 +304,6 @@ PasswordStore* CredentialManagerDispatcher::GetPasswordStore() {
|
| return client_ ? client_->GetPasswordStore() : nullptr;
|
| }
|
|
|
| -bool CredentialManagerDispatcher::IsSavingEnabledForCurrentPage() const {
|
| - // TODO(vasilii): add more, see http://crbug.com/450583.
|
| - return !client_->IsOffTheRecord();
|
| -}
|
| -
|
| bool CredentialManagerDispatcher::IsZeroClickAllowed() const {
|
| return *auto_signin_enabled_ && !client_->IsOffTheRecord();
|
| }
|
|
|