#include "base/time/time.h"
#include "components/password_manager/core/browser/password_store_default.h"
-class LoginDatabase;
class PrefService;
namespace user_prefs {
class PrefRegistrySyncable;
}
+namespace password_manager {
+class LoginDatabase;
+}
+
// PasswordStoreX is used on Linux and other non-Windows, non-Mac OS X
// operating systems. It uses a "native backend" to actually store the password
// data when such a backend is available, and otherwise falls back to using the
// migrating password data to a native backend from the login database.
//
// There are currently native backends for GNOME Keyring and KWallet.
-class PasswordStoreX : public PasswordStoreDefault {
+class PasswordStoreX : public password_manager::PasswordStoreDefault {
public:
// NativeBackends more or less implement the PaswordStore interface, but
// with return values rather than implicit consumer notification.
// case this PasswordStoreX will act the same as PasswordStoreDefault.
PasswordStoreX(scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner,
- LoginDatabase* login_db,
+ password_manager::LoginDatabase* login_db,
NativeBackend* backend);
-#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
- // Registers the pref setting used for the methods below.
- static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
-
- // Returns true if passwords have been tagged with the local profile id.
- static bool PasswordsUseLocalProfileId(PrefService* prefs);
-
- // Sets the persistent bit indicating that passwords have been tagged with the
- // local profile id. This cannot be unset; passwords get migrated only once.
- // The caller promises that |prefs| will not be deleted any time soon.
- static void SetPasswordsUseLocalProfileId(PrefService* prefs);
-#endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
-
private:
friend class PasswordStoreXTest;
virtual ~PasswordStoreX();
// Implements PasswordStore interface.
- virtual PasswordStoreChangeList AddLoginImpl(
+ virtual password_manager::PasswordStoreChangeList AddLoginImpl(
const autofill::PasswordForm& form) OVERRIDE;
- virtual PasswordStoreChangeList UpdateLoginImpl(
+ virtual password_manager::PasswordStoreChangeList UpdateLoginImpl(
const autofill::PasswordForm& form) OVERRIDE;
- virtual PasswordStoreChangeList RemoveLoginImpl(
+ virtual password_manager::PasswordStoreChangeList RemoveLoginImpl(
const autofill::PasswordForm& form) OVERRIDE;
- virtual PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl(
- const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
+ virtual password_manager::PasswordStoreChangeList
+ RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin,
+ const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(
const autofill::PasswordForm& form,
AuthorizationPromptPolicy prompt_policy,