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

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

Issue 825773003: PasswordStore: Use ScopedVector to express ownership of forms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use assignment instead of construction Created 5 years, 11 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.h
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index 394ab9e99bd2ef9b29e170a0e45048fe5d213a21..b843c752f218f1c8835d5cafa5a86122ad2cafaa 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -9,6 +9,7 @@
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/threading/thread.h"
#include "components/password_manager/core/browser/login_database.h"
#include "components/password_manager/core/browser/password_store.h"
@@ -80,9 +81,9 @@ class PasswordStoreMac : public password_manager::PasswordStore {
void GetAutofillableLoginsImpl(GetLoginsRequest* request) override;
void GetBlacklistLoginsImpl(GetLoginsRequest* request) override;
bool FillAutofillableLogins(
- std::vector<autofill::PasswordForm*>* forms) override;
+ ScopedVector<autofill::PasswordForm>* forms) override;
bool FillBlacklistLogins(
- std::vector<autofill::PasswordForm*>* forms) override;
+ ScopedVector<autofill::PasswordForm>* forms) override;
// Adds the given form to the Keychain if it's something we want to store
// there (i.e., not a blacklist entry). Returns true if the operation
@@ -103,9 +104,9 @@ class PasswordStoreMac : public password_manager::PasswordStore {
const std::vector<autofill::PasswordForm*>& forms);
// Searches the database for forms without a corresponding entry in the
- // keychain. Removes those forms from the database, and returns them in
- // |forms|. Ownership of |forms| is passed to the caller.
- void CleanOrphanedForms(std::vector<autofill::PasswordForm*>* forms);
+ // keychain. Removes those forms from the database, and adds them to
+ // |orphaned_forms|.
+ void CleanOrphanedForms(ScopedVector<autofill::PasswordForm>* orphaned_forms);
scoped_ptr<crypto::AppleKeychain> keychain_;

Powered by Google App Engine
This is Rietveld 408576698