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

Unified Diff: components/password_manager/core/browser/password_store.h

Issue 1369173002: Implement origin-based deletion for passwords in PasswordDefaultStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Drain message loop during fixture teardown Created 5 years, 2 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_store.h
diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h
index 24b40455aac866fd772e1ed7ff8c176629fd023a..8b196496bee6dda615a0cbb4fbb871bdd578bae1 100644
--- a/components/password_manager/core/browser/password_store.h
+++ b/components/password_manager/core/browser/password_store.h
@@ -18,6 +18,10 @@
#include "components/password_manager/core/browser/statistics_table.h"
#include "sync/api/syncable_service.h"
+namespace url {
+class Origin;
+}
+
namespace autofill {
struct PasswordForm;
}
@@ -103,6 +107,15 @@ class PasswordStore : protected PasswordStoreSync,
// Removes the matching PasswordForm from the secure password store (async).
virtual void RemoveLogin(const autofill::PasswordForm& form);
+ // Remove all logins which are same-origin with the given origin and created
+ // in the given date range. |completion| will be posted to the
+ // |main_thread_runner_| after deletions have been completed and notification
+ // have been sent out.
+ virtual void RemoveLoginsByOriginAndTime(const url::Origin& origin,
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion);
+
// Removes all logins created in the given date range. If |completion| is not
// null, it will be posted to the |main_thread_runner_| after deletions have
// be completed and notification have been sent out.
@@ -218,6 +231,12 @@ class PasswordStore : protected PasswordStoreSync,
bool custom_passphrase_sync_enabled) = 0;
// Synchronous implementation to remove the given logins.
+ virtual PasswordStoreChangeList RemoveLoginsByOriginAndTimeImpl(
+ const url::Origin& origin,
+ base::Time delete_begin,
+ base::Time delete_end);
+
+ // Synchronous implementation to remove the given logins.
virtual PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl(
base::Time delete_begin,
base::Time delete_end) = 0;
@@ -317,6 +336,10 @@ class PasswordStore : protected PasswordStoreSync,
void UpdateLoginWithPrimaryKeyInternal(
const autofill::PasswordForm& new_form,
const autofill::PasswordForm& old_primary_key);
+ void RemoveLoginsByOriginAndTimeInternal(const url::Origin& origin,
+ base::Time delete_begin,
+ base::Time delete_end,
+ const base::Closure& completion);
void RemoveLoginsCreatedBetweenInternal(base::Time delete_begin,
base::Time delete_end,
const base::Closure& completion);
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698