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

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

Issue 866983003: GetLoginsRequest: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@324291_scopedvector
Patch Set: Second fix of the rebase 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_mac.cc
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 45875a1d33c84659561ab9a28aa71d1ea74fc689..fcb918eacd2a0f2f4b6a4473eebfdbf17692499b 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -1087,18 +1087,18 @@ void PasswordStoreMac::GetLoginsImpl(
callback_runner.Run(matched_forms.Pass());
}
-void PasswordStoreMac::GetBlacklistLoginsImpl(GetLoginsRequest* request) {
- ScopedVector<autofill::PasswordForm> obtained_forms;
- FillBlacklistLogins(&obtained_forms);
- request->result()->swap(obtained_forms.get());
- ForwardLoginsResult(request);
+void PasswordStoreMac::GetBlacklistLoginsImpl(
+ scoped_ptr<PasswordStore::GetLoginsRequest> request) {
+ DCHECK(request->result()->empty());
+ FillBlacklistLogins(request->result());
+ ForwardLoginsResult(request.Pass());
}
-void PasswordStoreMac::GetAutofillableLoginsImpl(GetLoginsRequest* request) {
- ScopedVector<autofill::PasswordForm> obtained_forms;
- FillAutofillableLogins(&obtained_forms);
- request->result()->swap(obtained_forms.get());
- ForwardLoginsResult(request);
+void PasswordStoreMac::GetAutofillableLoginsImpl(
+ scoped_ptr<PasswordStore::GetLoginsRequest> request) {
+ DCHECK(request->result()->empty());
+ FillAutofillableLogins(request->result());
+ ForwardLoginsResult(request.Pass());
}
bool PasswordStoreMac::FillAutofillableLogins(
« no previous file with comments | « chrome/browser/password_manager/password_store_mac.h ('k') | chrome/browser/password_manager/password_store_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698