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

Unified Diff: chrome/browser/password_manager/native_backend_gnome_x.h

Issue 335893002: Support to remove passwords by date_synced timestamp. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vabr's comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/password_manager/native_backend_gnome_x.h
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.h b/chrome/browser/password_manager/native_backend_gnome_x.h
index c5d2c2ecd40e5ed1acf8fc7063d1c45ff340d28a..67d84a5e65d7887add560e22ec44bcf9fdccfc21 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.h
+++ b/chrome/browser/password_manager/native_backend_gnome_x.h
@@ -87,17 +87,26 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
const autofill::PasswordForm& form,
password_manager::PasswordStoreChangeList* changes) OVERRIDE;
virtual bool RemoveLogin(const autofill::PasswordForm& form) OVERRIDE;
- virtual bool RemoveLoginsCreatedBetween(
- const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
+ virtual bool RemoveLoginsCreatedBetween(base::Time delete_begin,
+ base::Time delete_end) OVERRIDE;
+ virtual bool RemoveLoginsSyncedBetween(
+ base::Time delete_begin,
+ base::Time delete_end,
+ password_manager::PasswordStoreChangeList* changes) OVERRIDE;
virtual bool GetLogins(const autofill::PasswordForm& form,
PasswordFormList* forms) OVERRIDE;
- virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
- const base::Time& get_end,
+ virtual bool GetLoginsCreatedBetween(base::Time get_begin,
+ base::Time get_end,
PasswordFormList* forms) OVERRIDE;
virtual bool GetAutofillableLogins(PasswordFormList* forms) OVERRIDE;
virtual bool GetBlacklistLogins(PasswordFormList* forms) OVERRIDE;
private:
+ enum TimestampToCompare {
+ CREATION_TIMESTAMP,
+ SYNC_TIMESTAMP,
+ };
+
// Adds a login form without checking for one to replace first.
bool RawAddLogin(const autofill::PasswordForm& form);
@@ -107,6 +116,20 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
// Helper for GetLoginsCreatedBetween().
bool GetAllLogins(PasswordFormList* forms);
+ // Retrieves password created/synced in the time interval. Returns |true| if
+ // the operation succeeded.
+ bool GetLoginsBetween(base::Time get_begin,
+ base::Time get_end,
+ TimestampToCompare date_to_compare,
+ PasswordFormList* forms);
+
+ // Removes password created/synced in the time interval. Returns |true| if the
+ // operation succeeded. |changes| will contain the changes applied.
+ bool RemoveLoginsBetween(base::Time get_begin,
+ base::Time get_end,
+ TimestampToCompare date_to_compare,
+ password_manager::PasswordStoreChangeList* changes);
+
// Generates a profile-specific app string based on profile_id_.
std::string GetProfileSpecificAppString() const;

Powered by Google App Engine
This is Rietveld 408576698