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

Unified Diff: chrome/browser/password_manager/password_store_x.cc

Issue 911323003: Simplify GetLoginsRequest, and let PasswordStore::GetLoginsImpl take scoped_ptr<GetLoginsRequest> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ps_fill_logins
Patch Set: Fix another Win compiler error. Created 5 years, 10 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: chrome/browser/password_manager/password_store_x.cc
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index 2ff703c30c76604c8ccde943a2b3927dce94939e..5ae4cde964e68efb4af3b48bfdb2fad2b417089f 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -164,13 +164,14 @@ void PasswordStoreX::GetAutofillableLoginsImpl(
// See GetLoginsImpl() for why we disallow fallback conditionally here.
if (!obtained_forms.empty())
allow_fallback_ = false;
- request->result()->swap(obtained_forms);
+ request->NotifyConsumerWithResults(obtained_forms.Pass());
+ return;
} else if (allow_default_store()) {
PasswordStoreDefault::GetAutofillableLoginsImpl(request.Pass());
return;
}
// The consumer will be left hanging unless we reply.
- ForwardLoginsResult(request.Pass());
+ request->NotifyConsumerWithResults(ScopedVector<autofill::PasswordForm>());
}
void PasswordStoreX::GetBlacklistLoginsImpl(
@@ -182,13 +183,14 @@ void PasswordStoreX::GetBlacklistLoginsImpl(
// See GetLoginsImpl() for why we disallow fallback conditionally here.
if (!obtained_forms.empty())
allow_fallback_ = false;
- request->result()->swap(obtained_forms);
+ request->NotifyConsumerWithResults(obtained_forms.Pass());
+ return;
} else if (allow_default_store()) {
PasswordStoreDefault::GetBlacklistLoginsImpl(request.Pass());
return;
}
// The consumer will be left hanging unless we reply.
- ForwardLoginsResult(request.Pass());
+ request->NotifyConsumerWithResults(ScopedVector<autofill::PasswordForm>());
}
bool PasswordStoreX::FillAutofillableLogins(
« no previous file with comments | « chrome/browser/password_manager/password_store_win.cc ('k') | components/password_manager/core/browser/password_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698