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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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 Profile; 17 class Profile;
17 18
18 // 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
19 // 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
20 // 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
21 // login database like PasswordStoreDefault. It also handles automatically 22 // login database like PasswordStoreDefault. It also handles automatically
22 // migrating password data to a native backend from the login database. 23 // migrating password data to a native backend from the login database.
23 // 24 //
24 // There are currently native backends for GNOME Keyring and KWallet. 25 // There are currently native backends for GNOME Keyring and KWallet.
25 class PasswordStoreX : public PasswordStoreDefault { 26 class PasswordStoreX : public PasswordStoreDefault {
(...skipping 23 matching lines...) Expand all
49 }; 50 };
50 51
51 // 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
52 // case this PasswordStoreX will act the same as PasswordStoreDefault. 53 // case this PasswordStoreX will act the same as PasswordStoreDefault.
53 PasswordStoreX(LoginDatabase* login_db, 54 PasswordStoreX(LoginDatabase* login_db,
54 Profile* profile, 55 Profile* profile,
55 NativeBackend* backend); 56 NativeBackend* backend);
56 57
57 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) 58 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
58 // Registers the pref setting used for the methods below. 59 // Registers the pref setting used for the methods below.
59 static void RegisterUserPrefs(PrefService* prefs); 60 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
60 61
61 // 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.
62 static bool PasswordsUseLocalProfileId(PrefService* prefs); 63 static bool PasswordsUseLocalProfileId(PrefService* prefs);
63 64
64 // 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
65 // 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.
66 // 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.
67 static void SetPasswordsUseLocalProfileId(PrefService* prefs); 68 static void SetPasswordsUseLocalProfileId(PrefService* prefs);
68 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) 69 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
69 70
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // 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
117 // 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
118 // 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
119 // we have migrated successfully, then we do not allow falling back. 120 // we have migrated successfully, then we do not allow falling back.
120 bool allow_fallback_; 121 bool allow_fallback_;
121 122
122 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX); 123 DISALLOW_COPY_AND_ASSIGN(PasswordStoreX);
123 }; 124 };
124 125
125 #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