| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 PasswordFormList* forms) = 0; | 47 PasswordFormList* forms) = 0; |
| 48 virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, | 48 virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, |
| 49 const base::Time& get_end, | 49 const base::Time& get_end, |
| 50 PasswordFormList* forms) = 0; | 50 PasswordFormList* forms) = 0; |
| 51 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0; | 51 virtual bool GetAutofillableLogins(PasswordFormList* forms) = 0; |
| 52 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0; | 52 virtual bool GetBlacklistLogins(PasswordFormList* forms) = 0; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which | 55 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which |
| 56 // case this PasswordStoreX will act the same as PasswordStoreDefault. | 56 // case this PasswordStoreX will act the same as PasswordStoreDefault. |
| 57 PasswordStoreX(LoginDatabase* login_db, | 57 PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 58 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 59 LoginDatabase* login_db, |
| 58 Profile* profile, | 60 Profile* profile, |
| 59 NativeBackend* backend); | 61 NativeBackend* backend); |
| 60 | 62 |
| 61 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) | 63 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) |
| 62 // Registers the pref setting used for the methods below. | 64 // Registers the pref setting used for the methods below. |
| 63 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 65 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 64 | 66 |
| 65 // Returns true if passwords have been tagged with the local profile id. | 67 // Returns true if passwords have been tagged with the local profile id. |
| 66 static bool PasswordsUseLocalProfileId(PrefService* prefs); | 68 static bool PasswordsUseLocalProfileId(PrefService* prefs); |
| 67 | 69 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Whether we should allow falling back to the default store. If there is | 123 // Whether we should allow falling back to the default store. If there is |
| 122 // nothing to migrate, then the first attempt to use the native store will | 124 // nothing to migrate, then the first attempt to use the native store will |
| 123 // be the first time we try to use it and we should allow falling back. If | 125 // be the first time we try to use it and we should allow falling back. If |
| 124 // we have migrated successfully, then we do not allow falling back. | 126 // we have migrated successfully, then we do not allow falling back. |
| 125 bool allow_fallback_; | 127 bool allow_fallback_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); | 129 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ | 132 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ |
| OLD | NEW |