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

Unified Diff: components/password_manager/core/browser/login_database.h

Issue 2566873002: Remove ScopedVector from PasswordStoreMac (Closed)
Patch Set: back_inserter Created 4 years 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: components/password_manager/core/browser/login_database.h
diff --git a/components/password_manager/core/browser/login_database.h b/components/password_manager/core/browser/login_database.h
index 4be14f0248e85d4712acfe26c1fdb46a4d2a61ef..c6cf73dc8341f2de75d19f16ba6df4d024d5a83e 100644
--- a/components/password_manager/core/browser/login_database.h
+++ b/components/password_manager/core/browser/login_database.h
@@ -12,7 +12,6 @@
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
#include "base/pickle.h"
#include "base/strings/string16.h"
#include "build/build_config.h"
@@ -98,14 +97,16 @@ class LoginDatabase {
bool GetLoginsCreatedBetween(
base::Time begin,
base::Time end,
- ScopedVector<autofill::PasswordForm>* forms) const WARN_UNUSED_RESULT;
+ std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) const
+ WARN_UNUSED_RESULT;
// Gets all logins synced from |begin| onwards (inclusive) and before |end|.
// You may use a null Time value to do an unbounded search in either
// direction.
- bool GetLoginsSyncedBetween(base::Time begin,
- base::Time end,
- ScopedVector<autofill::PasswordForm>* forms) const
+ bool GetLoginsSyncedBetween(
+ base::Time begin,
+ base::Time end,
+ std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) const
WARN_UNUSED_RESULT;
// Gets the complete list of not blacklisted credentials.
@@ -118,8 +119,8 @@ class LoginDatabase {
forms) const WARN_UNUSED_RESULT;
// Gets the list of auto-sign-inable credentials.
- bool GetAutoSignInLogins(ScopedVector<autofill::PasswordForm>* forms) const
- WARN_UNUSED_RESULT;
+ bool GetAutoSignInLogins(std::vector<std::unique_ptr<autofill::PasswordForm>>*
+ forms) const WARN_UNUSED_RESULT;
// Deletes the login database file on disk, and creates a new, empty database.
// This can be used after migrating passwords to some other store, to ensure
@@ -192,9 +193,10 @@ class LoginDatabase {
// Overwrites |forms| with credentials retrieved from |statement|. If
// |matched_form| is not null, filters out all results but those PSL-matching
// |*matched_form| or federated credentials for it. On success returns true.
- static bool StatementToForms(sql::Statement* statement,
- const PasswordStore::FormDigest* matched_form,
- ScopedVector<autofill::PasswordForm>* forms);
+ static bool StatementToForms(
+ sql::Statement* statement,
+ const PasswordStore::FormDigest* matched_form,
+ std::vector<std::unique_ptr<autofill::PasswordForm>>* forms);
// Initializes all the *_statement_ data members with appropriate SQL
// fragments based on |builder|.

Powered by Google App Engine
This is Rietveld 408576698