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_NATIVE_BACKEND_GNOME_X_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
7 | 7 |
8 #include <gnome-keyring.h> | 8 #include <gnome-keyring.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 virtual bool Init() OVERRIDE; | 81 virtual bool Init() OVERRIDE; |
82 | 82 |
83 // Implements NativeBackend interface. | 83 // Implements NativeBackend interface. |
84 virtual password_manager::PasswordStoreChangeList AddLogin( | 84 virtual password_manager::PasswordStoreChangeList AddLogin( |
85 const autofill::PasswordForm& form) OVERRIDE; | 85 const autofill::PasswordForm& form) OVERRIDE; |
86 virtual bool UpdateLogin( | 86 virtual bool UpdateLogin( |
87 const autofill::PasswordForm& form, | 87 const autofill::PasswordForm& form, |
88 password_manager::PasswordStoreChangeList* changes) OVERRIDE; | 88 password_manager::PasswordStoreChangeList* changes) OVERRIDE; |
89 virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE; | 89 virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE; |
90 virtual bool RemoveLoginsCreatedBetween( | 90 virtual bool RemoveLoginsCreatedBetween(base::Time delete_begin, |
91 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; | 91 base::Time delete_end) OVERRIDE; |
vabr (Chromium)
2014/06/17 15:28:40
Please also comment on the special meaning of the
vabr (Chromium)
2014/06/17 16:53:30
The appropriate place for the comment is actually
vasilii
2014/06/17 17:24:14
Done.
| |
92 virtual bool RemoveLoginsSyncedBetween( | |
93 base::Time delete_begin, | |
94 base::Time delete_end, | |
95 password_manager::PasswordStoreChangeList* changes) OVERRIDE; | |
92 virtual bool GetLogins(const autofill::PasswordForm& form, | 96 virtual bool GetLogins(const autofill::PasswordForm& form, |
93 PasswordFormList* forms) OVERRIDE; | 97 PasswordFormList* forms) OVERRIDE; |
94 virtual bool GetLoginsCreatedBetween(const base::Time& get_begin, | 98 virtual bool GetLoginsCreatedBetween(base::Time get_begin, base::Time get_end, |
vabr (Chromium)
2014/06/17 15:28:40
optional nit: Is this formatting according to clan
vasilii
2014/06/17 17:24:14
Done.
| |
95 const base::Time& get_end, | |
96 PasswordFormList* forms) OVERRIDE; | 99 PasswordFormList* forms) OVERRIDE; |
97 virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE; | 100 virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE; |
98 virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE; | 101 virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE; |
99 | 102 |
100 private: | 103 private: |
101 // Adds a login form without checking for one to replace first. | 104 // Adds a login form without checking for one to replace first. |
102 bool RawAddLogin(const autofill::PasswordForm& form); | 105 bool RawAddLogin(const autofill::PasswordForm& form); |
103 | 106 |
104 // Reads PasswordForms from the keyring with the given autofillability state. | 107 // Reads PasswordForms from the keyring with the given autofillability state. |
105 bool GetLoginsList(PasswordFormList* forms, bool autofillable); | 108 bool GetLoginsList(PasswordFormList* forms, bool autofillable); |
106 | 109 |
107 // Helper for GetLoginsCreatedBetween(). | 110 // Helper for GetLoginsCreatedBetween(). |
108 bool GetAllLogins(PasswordFormList* forms); | 111 bool GetAllLogins(PasswordFormList* forms); |
109 | 112 |
113 // Retrieves password created/synced in the time interval. | |
vabr (Chromium)
2014/06/17 15:28:40
Please comment on the return value (also below).
vasilii
2014/06/17 17:24:14
Done.
| |
114 bool GetLoginsBetween(base::Time get_begin, base::Time get_end, | |
115 bool date_is_creation, | |
vabr (Chromium)
2014/06/17 15:28:40
|date_is_creation| would deserve an explanation. I
vasilii
2014/06/17 17:24:14
Done.
| |
116 PasswordFormList* forms); | |
117 | |
118 // Removes password created/synced in the time interval. | |
119 bool RemoveLoginsBetween(base::Time get_begin, base::Time get_end, | |
120 bool date_is_creation, | |
121 password_manager::PasswordStoreChangeList* changes); | |
122 | |
110 // Generates a profile-specific app string based on profile_id_. | 123 // Generates a profile-specific app string based on profile_id_. |
111 std::string GetProfileSpecificAppString() const; | 124 std::string GetProfileSpecificAppString() const; |
112 | 125 |
113 // The local profile id, used to generate the app string. | 126 // The local profile id, used to generate the app string. |
114 const LocalProfileId profile_id_; | 127 const LocalProfileId profile_id_; |
115 | 128 |
116 // The app string, possibly based on the local profile id. | 129 // The app string, possibly based on the local profile id. |
117 std::string app_string_; | 130 std::string app_string_; |
118 | 131 |
119 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); | 132 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); |
120 }; | 133 }; |
121 | 134 |
122 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 135 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
OLD | NEW |