OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // delete in either direction. | 51 // delete in either direction. |
52 virtual bool RemoveLoginsCreatedBetween( | 52 virtual bool RemoveLoginsCreatedBetween( |
53 base::Time delete_begin, | 53 base::Time delete_begin, |
54 base::Time delete_end, | 54 base::Time delete_end, |
55 password_manager::PasswordStoreChangeList* changes) = 0; | 55 password_manager::PasswordStoreChangeList* changes) = 0; |
56 virtual bool RemoveLoginsSyncedBetween( | 56 virtual bool RemoveLoginsSyncedBetween( |
57 base::Time delete_begin, | 57 base::Time delete_begin, |
58 base::Time delete_end, | 58 base::Time delete_end, |
59 password_manager::PasswordStoreChangeList* changes) = 0; | 59 password_manager::PasswordStoreChangeList* changes) = 0; |
60 | 60 |
| 61 // The three methods below overwrite |forms| with all stored credentials |
| 62 // matching |form|, all stored non-blacklisted credentials, and all stored |
| 63 // blacklisted credentials, respectively. On success, they return true. |
61 virtual bool GetLogins(const autofill::PasswordForm& form, | 64 virtual bool GetLogins(const autofill::PasswordForm& form, |
62 ScopedVector<autofill::PasswordForm>* forms) = 0; | 65 ScopedVector<autofill::PasswordForm>* forms) |
| 66 WARN_UNUSED_RESULT = 0; |
63 virtual bool GetAutofillableLogins( | 67 virtual bool GetAutofillableLogins( |
64 ScopedVector<autofill::PasswordForm>* forms) = 0; | 68 ScopedVector<autofill::PasswordForm>* forms) WARN_UNUSED_RESULT = 0; |
65 virtual bool GetBlacklistLogins( | 69 virtual bool GetBlacklistLogins(ScopedVector<autofill::PasswordForm>* forms) |
66 ScopedVector<autofill::PasswordForm>* forms) = 0; | 70 WARN_UNUSED_RESULT = 0; |
67 }; | 71 }; |
68 | 72 |
69 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which | 73 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which |
70 // case this PasswordStoreX will act the same as PasswordStoreDefault. | 74 // case this PasswordStoreX will act the same as PasswordStoreDefault. |
71 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, | 75 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
72 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, | 76 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
73 scoped_ptr<password_manager::LoginDatabase> login_db, | 77 scoped_ptr<password_manager::LoginDatabase> login_db, |
74 NativeBackend* backend); | 78 NativeBackend* backend); |
75 | 79 |
76 private: | 80 private: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Whether we should allow falling back to the default store. If there is | 126 // Whether we should allow falling back to the default store. If there is |
123 // nothing to migrate, then the first attempt to use the native store will | 127 // nothing to migrate, then the first attempt to use the native store will |
124 // be the first time we try to use it and we should allow falling back. If | 128 // be the first time we try to use it and we should allow falling back. If |
125 // we have migrated successfully, then we do not allow falling back. | 129 // we have migrated successfully, then we do not allow falling back. |
126 bool allow_fallback_; | 130 bool allow_fallback_; |
127 | 131 |
128 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); | 132 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); |
129 }; | 133 }; |
130 | 134 |
131 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ | 135 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ |
OLD | NEW |