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

Side by Side Diff: components/password_manager/core/browser/password_store_default.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const autofill::PasswordForm& form) override; 46 const autofill::PasswordForm& form) override;
47 PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl( 47 PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl(
48 base::Time delete_begin, 48 base::Time delete_begin,
49 base::Time delete_end) override; 49 base::Time delete_end) override;
50 PasswordStoreChangeList RemoveLoginsSyncedBetweenImpl( 50 PasswordStoreChangeList RemoveLoginsSyncedBetweenImpl(
51 base::Time delete_begin, 51 base::Time delete_begin,
52 base::Time delete_end) override; 52 base::Time delete_end) override;
53 void GetLoginsImpl(const autofill::PasswordForm& form, 53 void GetLoginsImpl(const autofill::PasswordForm& form,
54 AuthorizationPromptPolicy prompt_policy, 54 AuthorizationPromptPolicy prompt_policy,
55 const ConsumerCallbackRunner& callback_runner) override; 55 const ConsumerCallbackRunner& callback_runner) override;
56 void GetAutofillableLoginsImpl(GetLoginsRequest* request) override; 56 void GetAutofillableLoginsImpl(scoped_ptr<GetLoginsRequest> request) override;
57 void GetBlacklistLoginsImpl(GetLoginsRequest* request) override; 57 void GetBlacklistLoginsImpl(scoped_ptr<GetLoginsRequest> request) override;
58 bool FillAutofillableLogins( 58 bool FillAutofillableLogins(
59 ScopedVector<autofill::PasswordForm>* forms) override; 59 ScopedVector<autofill::PasswordForm>* forms) override;
60 bool FillBlacklistLogins( 60 bool FillBlacklistLogins(
61 ScopedVector<autofill::PasswordForm>* forms) override; 61 ScopedVector<autofill::PasswordForm>* forms) override;
62 62
63 protected: 63 protected:
64 inline bool DeleteAndRecreateDatabaseFile() { 64 inline bool DeleteAndRecreateDatabaseFile() {
65 return login_db_->DeleteAndRecreateDatabaseFile(); 65 return login_db_->DeleteAndRecreateDatabaseFile();
66 } 66 }
67 67
68 private: 68 private:
69 // The login SQL database. The LoginDatabase instance is received via the 69 // The login SQL database. The LoginDatabase instance is received via the
70 // in an uninitialized state, so as to allow injecting mocks, then Init() is 70 // in an uninitialized state, so as to allow injecting mocks, then Init() is
71 // called on the DB thread in a deferred manner. If opening the DB fails, 71 // called on the DB thread in a deferred manner. If opening the DB fails,
72 // |login_db_| will be reset and stay NULL for the lifetime of |this|. 72 // |login_db_| will be reset and stay NULL for the lifetime of |this|.
73 scoped_ptr<LoginDatabase> login_db_; 73 scoped_ptr<LoginDatabase> login_db_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault); 75 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault);
76 }; 76 };
77 77
78 } // namespace password_manager 78 } // namespace password_manager
79 79
80 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 80 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698