| 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 // libgnome-keyring has been deprecated in favor of libsecret. | 8 // libgnome-keyring has been deprecated in favor of libsecret. |
| 9 // See: https://mail.gnome.org/archives/commits-list/2013-October/msg08876.html | 9 // See: https://mail.gnome.org/archives/commits-list/2013-October/msg08876.html |
| 10 // | 10 // |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 enum TimestampToCompare { | 115 enum TimestampToCompare { |
| 116 CREATION_TIMESTAMP, | 116 CREATION_TIMESTAMP, |
| 117 SYNC_TIMESTAMP, | 117 SYNC_TIMESTAMP, |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // Adds a login form without checking for one to replace first. | 120 // Adds a login form without checking for one to replace first. |
| 121 bool RawAddLogin(const autofill::PasswordForm& form); | 121 bool RawAddLogin(const autofill::PasswordForm& form); |
| 122 | 122 |
| 123 // Reads PasswordForms from the keyring with the given autofillability state. | 123 // Overwrites |forms| with blacklisted or autofillable, depending on |
| 124 // |autofillable| being false or true, credentials from the keyring. In case |
| 125 // of failures returns false and erases |forms|, otherwise returns true. |
| 124 bool GetLoginsList(bool autofillable, | 126 bool GetLoginsList(bool autofillable, |
| 125 ScopedVector<autofill::PasswordForm>* forms); | 127 ScopedVector<autofill::PasswordForm>* forms); |
| 126 | 128 |
| 127 // Helper for GetLoginsCreatedBetween(). | 129 // Helper for GetLoginsCreatedBetween(). |
| 128 bool GetAllLogins(ScopedVector<autofill::PasswordForm>* forms); | 130 bool GetAllLogins(ScopedVector<autofill::PasswordForm>* forms); |
| 129 | 131 |
| 130 // Retrieves password created/synced in the time interval. Returns |true| if | 132 // Retrieves password created/synced in the time interval. Returns |true| if |
| 131 // the operation succeeded. | 133 // the operation succeeded. |
| 132 bool GetLoginsBetween(base::Time get_begin, | 134 bool GetLoginsBetween(base::Time get_begin, |
| 133 base::Time get_end, | 135 base::Time get_end, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 147 // The local profile id, used to generate the app string. | 149 // The local profile id, used to generate the app string. |
| 148 const LocalProfileId profile_id_; | 150 const LocalProfileId profile_id_; |
| 149 | 151 |
| 150 // The app string, possibly based on the local profile id. | 152 // The app string, possibly based on the local profile id. |
| 151 std::string app_string_; | 153 std::string app_string_; |
| 152 | 154 |
| 153 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); | 155 DISALLOW_COPY_AND_ASSIGN(NativeBackendGnome); |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ | 158 #endif // CHROME_BROWSER_PASSWORD_MANAGER_NATIVE_BACKEND_GNOME_X_H_ |
| OLD | NEW |