| Index: components/password_manager/core/browser/password_store.cc
|
| diff --git a/components/password_manager/core/browser/password_store.cc b/components/password_manager/core/browser/password_store.cc
|
| index 5789aee09e6a6fbc61dadfdec4a160a722ab7c03..7170db96d86295a04492c89fa44565944a07eba7 100644
|
| --- a/components/password_manager/core/browser/password_store.cc
|
| +++ b/components/password_manager/core/browser/password_store.cc
|
| @@ -189,6 +189,12 @@ void PasswordStore::GetAutofillableLogins(PasswordStoreConsumer* consumer) {
|
| Schedule(&PasswordStore::GetAutofillableLoginsImpl, consumer);
|
| }
|
|
|
| +void PasswordStore::GetAutofillableLoginsWithAffiliatedRealms(
|
| + PasswordStoreConsumer* consumer) {
|
| + Schedule(&PasswordStore::GetAutofillableLoginsWithAffiliatedRealmsImpl,
|
| + consumer);
|
| +}
|
| +
|
| void PasswordStore::GetBlacklistLogins(PasswordStoreConsumer* consumer) {
|
| Schedule(&PasswordStore::GetBlacklistLoginsImpl, consumer);
|
| }
|
| @@ -402,6 +408,38 @@ void PasswordStore::GetAutofillableLoginsImpl(
|
| request->NotifyConsumerWithResults(std::move(obtained_forms));
|
| }
|
|
|
| +void PasswordStore::GetAutofillableLoginsWithAffiliatedRealmsImpl(
|
| + scoped_ptr<GetLoginsRequest> request) {
|
| + scoped_ptr<ScopedVector<PasswordForm>> obtained_forms(
|
| + new ScopedVector<PasswordForm>());
|
| + if (!FillAutofillableLogins(obtained_forms.get()))
|
| + obtained_forms->clear();
|
| + // Since AffiliatedMatchHelper's requests should be sent from UI thread,
|
| + // post a request to UI thread.
|
| + main_thread_runner_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&PasswordStore::FillAffiliatedWebRealms, this,
|
| + base::Passed(&obtained_forms), base::Passed(&request)));
|
| +}
|
| +
|
| +void PasswordStore::FillAffiliatedWebRealms(
|
| + scoped_ptr<ScopedVector<PasswordForm>> forms,
|
| + scoped_ptr<GetLoginsRequest> request) {
|
| + if (affiliated_match_helper_) {
|
| + affiliated_match_helper_->FillAffiliatedWebRealms(
|
| + *forms, base::Bind(&PasswordStore::NotifyLoginsWithAffiliatedRealms,
|
| + this, base::Passed(&forms), base::Passed(&request)));
|
| + } else {
|
| + NotifyLoginsWithAffiliatedRealms(std::move(forms), std::move(request));
|
| + }
|
| +}
|
| +
|
| +void PasswordStore::NotifyLoginsWithAffiliatedRealms(
|
| + scoped_ptr<ScopedVector<PasswordForm>> obtained_forms,
|
| + scoped_ptr<GetLoginsRequest> request) {
|
| + request->NotifyConsumerWithResults(std::move(*(obtained_forms.release())));
|
| +}
|
| +
|
| void PasswordStore::GetBlacklistLoginsImpl(
|
| scoped_ptr<GetLoginsRequest> request) {
|
| ScopedVector<PasswordForm> obtained_forms;
|
|
|