| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual bool GetLogins(const autofill::PasswordForm& form, | 62 virtual bool GetLogins(const autofill::PasswordForm& form, |
| 63 PasswordFormList* forms) = 0; | 63 PasswordFormList* forms) = 0; |
| 64 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0; | 64 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0; |
| 65 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0; | 65 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which | 68 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which |
| 69 // case this PasswordStoreX will act the same as PasswordStoreDefault. | 69 // case this PasswordStoreX will act the same as PasswordStoreDefault. |
| 70 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, | 70 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
| 71 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, | 71 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 72 password_manager::LoginDatabase* login_db, | 72 scoped_ptr<password_manager::LoginDatabase> login_db, |
| 73 NativeBackend* backend); | 73 NativeBackend* backend); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend class PasswordStoreXTest; | 76 friend class PasswordStoreXTest; |
| 77 | 77 |
| 78 ~PasswordStoreX() override; | 78 ~PasswordStoreX() override; |
| 79 | 79 |
| 80 // Implements PasswordStore interface. | 80 // Implements PasswordStore interface. |
| 81 password_manager::PasswordStoreChangeList AddLoginImpl( | 81 password_manager::PasswordStoreChangeList AddLoginImpl( |
| 82 const autofill::PasswordForm& form) override; | 82 const autofill::PasswordForm& form) override; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // 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 |
| 127 // 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 |
| 128 // 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 |
| 129 // we have migrated successfully, then we do not allow falling back. | 129 // we have migrated successfully, then we do not allow falling back. |
| 130 bool allow_fallback_; | 130 bool allow_fallback_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); | 132 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ | 135 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ |
| OLD | NEW |