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

Unified Diff: chrome/browser/password_manager/native_backend_kwallet_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_kwallet_x.h
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.h b/chrome/browser/password_manager/native_backend_kwallet_x.h
index 2567ba0e5e01d1a77250d7186daad6c27eab39f2..4e7f689156b24a52b7e9937142b74394116a0d19 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.h
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.h
@@ -46,12 +46,16 @@ class NativeBackendKWallet : 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;
@@ -75,6 +79,11 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
PERMANENT_FAIL // Init failed, and is not likely to work later either.
};
+ enum TimestampToCompare {
+ CREATION_TIMESTAMP,
+ SYNC_TIMESTAMP,
+ };
+
// Initialization.
bool StartKWalletd();
InitResult InitWallet();
@@ -92,11 +101,12 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
bool autofillable,
int wallet_handle);
- // Reads PasswordForms from the wallet created in the given time range.
+ // Reads PasswordForms from the wallet created/synced in the given time range.
bool GetLoginsList(PasswordFormList* forms,
const base::Time& begin,
const base::Time& end,
- int wallet_handle);
+ int wallet_handle,
+ TimestampToCompare date_to_compare);
// Helper for some of the above GetLoginsList() methods.
bool GetAllLogins(PasswordFormList* forms, int wallet_handle);
@@ -108,6 +118,13 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
const std::string& signon_realm,
int wallet_handle);
+ // Removes password created/synced in the time interval. Returns |true| if the
+ // operation succeeded. |changes| will contain the changes applied.
+ bool RemoveLoginsBetween(base::Time delete_begin,
+ base::Time delete_end,
+ TimestampToCompare date_to_compare,
+ password_manager::PasswordStoreChangeList* changes);
+
// Opens the wallet and ensures that the "Chrome Form Data" folder exists.
// Returns kInvalidWalletHandle on error.
int WalletHandle();

Powered by Google App Engine
This is Rietveld 408576698