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

Side by Side Diff: chrome/browser/password_manager/password_store_x.h

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 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 | Annotate | Revision Log
OLDNEW
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"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "chrome/browser/password_manager/password_store_default.h" 12 #include "chrome/browser/password_manager/password_store_default.h"
13 13
14 class LoginDatabase; 14 class LoginDatabase;
15 class PrefService; 15 class PrefService;
16 class PrefServiceSyncable; 16 class PrefRegistrySyncable;
17 class Profile; 17 class Profile;
18 18
19 // PasswordStoreX is used on Linux and other non-Windows, non-Mac OS X 19 // PasswordStoreX is used on Linux and other non-Windows, non-Mac OS X
20 // operating systems. It uses a "native backend" to actually store the password 20 // operating systems. It uses a "native backend" to actually store the password
21 // data when such a backend is available, and otherwise falls back to using the 21 // data when such a backend is available, and otherwise falls back to using the
22 // login database like PasswordStoreDefault. It also handles automatically 22 // login database like PasswordStoreDefault. It also handles automatically
23 // migrating password data to a native backend from the login database. 23 // migrating password data to a native backend from the login database.
24 // 24 //
25 // There are currently native backends for GNOME Keyring and KWallet. 25 // There are currently native backends for GNOME Keyring and KWallet.
26 class PasswordStoreX : public PasswordStoreDefault { 26 class PasswordStoreX : public PasswordStoreDefault {
(...skipping 23 matching lines...) Expand all
50 }; 50 };
51 51
52 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which 52 // Takes ownership of |login_db| and |backend|. |backend| may be NULL in which
53 // case this PasswordStoreX will act the same as PasswordStoreDefault. 53 // case this PasswordStoreX will act the same as PasswordStoreDefault.
54 PasswordStoreX(LoginDatabase* login_db, 54 PasswordStoreX(LoginDatabase* login_db,
55 Profile* profile, 55 Profile* profile,
56 NativeBackend* backend); 56 NativeBackend* backend);
57 57
58 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) 58 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
59 // Registers the pref setting used for the methods below. 59 // Registers the pref setting used for the methods below.
60 static void RegisterUserPrefs(PrefServiceSyncable* prefs); 60 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
61 61
62 // Returns true if passwords have been tagged with the local profile id. 62 // Returns true if passwords have been tagged with the local profile id.
63 static bool PasswordsUseLocalProfileId(PrefService* prefs); 63 static bool PasswordsUseLocalProfileId(PrefService* prefs);
64 64
65 // Sets the persistent bit indicating that passwords have been tagged with the 65 // Sets the persistent bit indicating that passwords have been tagged with the
66 // local profile id. This cannot be unset; passwords get migrated only once. 66 // local profile id. This cannot be unset; passwords get migrated only once.
67 // The caller promises that |prefs| will not be deleted any time soon. 67 // The caller promises that |prefs| will not be deleted any time soon.
68 static void SetPasswordsUseLocalProfileId(PrefService* prefs); 68 static void SetPasswordsUseLocalProfileId(PrefService* prefs);
69 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) 69 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
70 70
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Whether we should allow falling back to the default store. If there is 117 // Whether we should allow falling back to the default store. If there is
118 // nothing to migrate, then the first attempt to use the native store will 118 // nothing to migrate, then the first attempt to use the native store will
119 // be the first time we try to use it and we should allow falling back. If 119 // be the first time we try to use it and we should allow falling back. If
120 // we have migrated successfully, then we do not allow falling back. 120 // we have migrated successfully, then we do not allow falling back.
121 bool allow_fallback_; 121 bool allow_fallback_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); 123 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX);
124 }; 124 };
125 125
126 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_ 126 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_X_H_
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_factory.cc ('k') | chrome/browser/password_manager/password_store_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698