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

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

Issue 347583004: PasswordStore refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_NATIVE_BACKEND_KWALLET_X_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 39
40 virtual bool Init() OVERRIDE; 40 virtual bool Init() OVERRIDE;
41 41
42 // Implements NativeBackend interface. 42 // Implements NativeBackend interface.
43 virtual password_manager::PasswordStoreChangeList AddLogin( 43 virtual password_manager::PasswordStoreChangeList AddLogin(
44 const autofill::PasswordForm& form) OVERRIDE; 44 const autofill::PasswordForm& form) OVERRIDE;
45 virtual bool UpdateLogin( 45 virtual bool UpdateLogin(
46 const autofill::PasswordForm& form, 46 const autofill::PasswordForm& form,
47 password_manager::PasswordStoreChangeList* changes) OVERRIDE; 47 password_manager::PasswordStoreChangeList* changes) OVERRIDE;
48 virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE; 48 virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE;
49 virtual bool RemoveLoginsCreatedBetween(base::Time delete_begin, 49 virtual bool RemoveLoginsCreatedBetween(
50 base::Time delete_end) OVERRIDE; 50 base::Time delete_begin,
51 base::Time delete_end,
52 password_manager::PasswordStoreChangeList* changes) OVERRIDE;
51 virtual bool RemoveLoginsSyncedBetween( 53 virtual bool RemoveLoginsSyncedBetween(
52 base::Time delete_begin, 54 base::Time delete_begin,
53 base::Time delete_end, 55 base::Time delete_end,
54 password_manager::PasswordStoreChangeList* changes) OVERRIDE; 56 password_manager::PasswordStoreChangeList* changes) OVERRIDE;
55 virtual bool GetLogins(const autofill::PasswordForm& form, 57 virtual bool GetLogins(const autofill::PasswordForm& form,
56 PasswordFormList* forms) OVERRIDE; 58 PasswordFormList* forms) OVERRIDE;
57 virtual bool GetLoginsCreatedBetween(base::Time get_begin,
58 base::Time get_end,
59 PasswordFormList* forms) OVERRIDE;
60 virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE; 59 virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE;
61 virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE; 60 virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE;
62 61
63 protected: 62 protected:
64 // Invalid handle returned by WalletHandle(). 63 // Invalid handle returned by WalletHandle().
65 static const int kInvalidKWalletHandle = -1; 64 static const int kInvalidKWalletHandle = -1;
66 65
67 // Internally used by Init(), but also for testing to provide a mock bus. 66 // Internally used by Init(), but also for testing to provide a mock bus.
68 bool InitWithBus(scoped_refptr<dbus::Bus> optional_bus); 67 bool InitWithBus(scoped_refptr<dbus::Bus> optional_bus);
69 68
(...skipping 24 matching lines...) Expand all
94 // Reads PasswordForms from the wallet that match the given signon_realm. 93 // Reads PasswordForms from the wallet that match the given signon_realm.
95 bool GetLoginsList(PasswordFormList* forms, 94 bool GetLoginsList(PasswordFormList* forms,
96 const std::string& signon_realm, 95 const std::string& signon_realm,
97 int wallet_handle); 96 int wallet_handle);
98 97
99 // Reads PasswordForms from the wallet with the given autofillability state. 98 // Reads PasswordForms from the wallet with the given autofillability state.
100 bool GetLoginsList(PasswordFormList* forms, 99 bool GetLoginsList(PasswordFormList* forms,
101 bool autofillable, 100 bool autofillable,
102 int wallet_handle); 101 int wallet_handle);
103 102
104 // Reads PasswordForms from the wallet created/synced in the given time range.
105 bool GetLoginsList(PasswordFormList* forms,
106 const base::Time& begin,
107 const base::Time& end,
108 int wallet_handle,
109 TimestampToCompare date_to_compare);
110
111 // Helper for some of the above GetLoginsList() methods. 103 // Helper for some of the above GetLoginsList() methods.
112 bool GetAllLogins(PasswordFormList* forms, int wallet_handle); 104 bool GetAllLogins(PasswordFormList* forms, int wallet_handle);
113 105
114 // Writes a list of PasswordForms to the wallet with the given signon_realm. 106 // Writes a list of PasswordForms to the wallet with the given signon_realm.
115 // Overwrites any existing list for this signon_realm. Removes the entry if 107 // Overwrites any existing list for this signon_realm. Removes the entry if
116 // |forms| is empty. Returns true on success. 108 // |forms| is empty. Returns true on success.
117 bool SetLoginsList(const PasswordFormList& forms, 109 bool SetLoginsList(const PasswordFormList& forms,
118 const std::string& signon_realm, 110 const std::string& signon_realm,
119 int wallet_handle); 111 int wallet_handle);
120 112
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 155
164 // The name of the wallet we've opened. Set during Init(). 156 // The name of the wallet we've opened. Set during Init().
165 std::string wallet_name_; 157 std::string wallet_name_;
166 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs. 158 // The application name (e.g. "Chromium"), shown in KWallet auth dialogs.
167 const std::string app_name_; 159 const std::string app_name_;
168 160
169 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet); 161 DISALLOW_COPY_AND_ASSIGN(NativeBackendKWallet);
170 }; 162 };
171 163
172 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_ 164 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_KWALLET_X_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698