| Index: components/password_manager/content/browser/credential_manager_impl.cc
|
| diff --git a/components/password_manager/content/browser/credential_manager_impl.cc b/components/password_manager/content/browser/credential_manager_impl.cc
|
| index 444d3adccf4dffaf6600381a428d1cc8213a65b5..7e6e528cdfb5fcb01a0ad3911bc271b6e3cf5008 100644
|
| --- a/components/password_manager/content/browser/credential_manager_impl.cc
|
| +++ b/components/password_manager/content/browser/credential_manager_impl.cc
|
| @@ -177,38 +177,13 @@ void CredentialManagerImpl::Get(bool zero_click_only,
|
| return;
|
| }
|
|
|
| - if (store->affiliated_match_helper()) {
|
| - store->affiliated_match_helper()->GetAffiliatedAndroidRealms(
|
| - GetSynthesizedFormForOrigin(),
|
| - base::Bind(&CredentialManagerImpl::ScheduleRequestTask,
|
| - weak_factory_.GetWeakPtr(), callback, zero_click_only,
|
| - include_passwords, federations));
|
| - } else {
|
| - std::vector<std::string> no_affiliated_realms;
|
| - ScheduleRequestTask(callback, zero_click_only, include_passwords,
|
| - federations, no_affiliated_realms);
|
| - }
|
| -}
|
| -
|
| -void CredentialManagerImpl::ScheduleRequestTask(
|
| - const GetCallback& callback,
|
| - bool zero_click_only,
|
| - bool include_passwords,
|
| - const std::vector<GURL>& federations,
|
| - const std::vector<std::string>& android_realms) {
|
| - DCHECK(GetPasswordStore());
|
| pending_request_.reset(new CredentialManagerPendingRequestTask(
|
| this, base::Bind(&RunMojoGetCallback, callback), zero_click_only,
|
| - web_contents()->GetLastCommittedURL().GetOrigin(), include_passwords,
|
| - federations, android_realms));
|
| -
|
| + include_passwords, federations));
|
| // This will result in a callback to
|
| // PendingRequestTask::OnGetPasswordStoreResults().
|
| - GetPasswordStore()->GetAutofillableLogins(pending_request_.get());
|
| -}
|
| -
|
| -PasswordStore* CredentialManagerImpl::GetPasswordStore() {
|
| - return client_ ? client_->GetPasswordStore() : nullptr;
|
| + GetPasswordStore()->GetLogins(GetSynthesizedFormForOrigin(),
|
| + pending_request_.get());
|
| }
|
|
|
| bool CredentialManagerImpl::IsZeroClickAllowed() const {
|
| @@ -278,6 +253,15 @@ PasswordManagerClient* CredentialManagerImpl::client() const {
|
| return client_;
|
| }
|
|
|
| +PasswordStore* CredentialManagerImpl::GetPasswordStore() {
|
| + return client_ ? client_->GetPasswordStore() : nullptr;
|
| +}
|
| +
|
| +void CredentialManagerImpl::DoneRequiringUserMediation() {
|
| + DCHECK(pending_require_user_mediation_);
|
| + pending_require_user_mediation_.reset();
|
| +}
|
| +
|
| PasswordStore::FormDigest CredentialManagerImpl::GetSynthesizedFormForOrigin()
|
| const {
|
| PasswordStore::FormDigest digest = {
|
| @@ -287,9 +271,4 @@ PasswordStore::FormDigest CredentialManagerImpl::GetSynthesizedFormForOrigin()
|
| return digest;
|
| }
|
|
|
| -void CredentialManagerImpl::DoneRequiringUserMediation() {
|
| - DCHECK(pending_require_user_mediation_);
|
| - pending_require_user_mediation_.reset();
|
| -}
|
| -
|
| } // namespace password_manager
|
|
|