Chromium Code Reviews| Index: components/password_manager/core/browser/password_store.h |
| diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h |
| index fb7d3bb25819c1b3939f1e46d83efc67543dc1e9..ef53b08e8830497e157a07e702081422b7239b0b 100644 |
| --- a/components/password_manager/core/browser/password_store.h |
| +++ b/components/password_manager/core/browser/password_store.h |
| @@ -84,9 +84,7 @@ class PasswordStore : protected PasswordStoreSync, |
| // Forward the result to the consumer on the original message loop. |
| void ForwardResult(); |
| - std::vector<autofill::PasswordForm*>* result() const { |
| - return result_.get(); |
| - } |
| + ScopedVector<autofill::PasswordForm>* result() { return &result_; } |
| private: |
| // See GetLogins(). Logins older than this will be removed from the reply. |
| @@ -98,7 +96,7 @@ class PasswordStore : protected PasswordStoreSync, |
| // thread and consumed on the UI thread. |
| // TODO(dubroy): Remove this, and instead pass the vector directly to the |
|
vasilii
2015/02/03 19:22:17
Obsolete?
vabr (Chromium)
2015/02/04 16:13:44
I'm not sure, because I don't know what "this" in
|
| // backend methods. |
| - scoped_ptr<std::vector<autofill::PasswordForm*>> result_; |
| + ScopedVector<autofill::PasswordForm> result_; |
| base::ThreadChecker thread_checker_; |
| scoped_refptr<base::MessageLoopProxy> origin_loop_; |
| @@ -235,14 +233,15 @@ class PasswordStore : protected PasswordStoreSync, |
| const ConsumerCallbackRunner& callback_runner) = 0; |
| // Finds all non-blacklist PasswordForms, and notifies the consumer. |
| - virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) = 0; |
| + virtual void GetAutofillableLoginsImpl( |
| + scoped_ptr<GetLoginsRequest> request) = 0; |
| // Finds all blacklist PasswordForms, and notifies the consumer. |
| - virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) = 0; |
| + virtual void GetBlacklistLoginsImpl(scoped_ptr<GetLoginsRequest> request) = 0; |
| // Dispatches the result to the PasswordStoreConsumer on the original caller's |
| // thread so the callback can be executed there. This should be the UI thread. |
| - static void ForwardLoginsResult(GetLoginsRequest* request); |
| + static void ForwardLoginsResult(scoped_ptr<GetLoginsRequest> request); |
| // Log UMA stats for number of bulk deletions. |
| void LogStatsForBulkDeletion(int num_deletions); |
| @@ -291,7 +290,7 @@ class PasswordStore : protected PasswordStoreSync, |
| // |GetLoginsImpl| and |PasswordStoreConsumer|. |
| // TODO(dubroy): Get rid of this. |
| static void CopyAndForwardLoginsResult( |
| - PasswordStore::GetLoginsRequest* request, |
| + scoped_ptr<PasswordStore::GetLoginsRequest> request, |
| ScopedVector<autofill::PasswordForm> matched_forms); |
| #if defined(PASSWORD_MANAGER_ENABLE_SYNC) |