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

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

Issue 2320763002: Support origin-based deletion for password store statistics (Closed)
Patch Set: Created 4 years, 3 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: components/password_manager/core/browser/statistics_table.h
diff --git a/components/password_manager/core/browser/statistics_table.h b/components/password_manager/core/browser/statistics_table.h
index 1a0d3af5dcd8cab9901b70f41ba1e82b26fb1e95..eefa3b45a7de835aa9ce6b9723c07ae281e3fa7f 100644
--- a/components/password_manager/core/browser/statistics_table.h
+++ b/components/password_manager/core/browser/statistics_table.h
@@ -8,6 +8,7 @@
#include <memory>
#include <vector>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
@@ -71,9 +72,13 @@ class StatisticsTable {
// Returns the statistics for |domain| if it exists.
std::vector<std::unique_ptr<InteractionsStats>> GetRows(const GURL& domain);
- // Removes the statistics between the dates. Returns true if the SQL completed
- // successfully.
- bool RemoveStatsBetween(base::Time delete_begin, base::Time delete_end);
+ // Removes the statistics between the dates. If |origin_filter| is not null,
+ // only statistics for matching origins are removed. Returns true if the SQL
+ // completed successfully.
+ bool RemoveStatsByOriginAndTime(
+ const base::Callback<bool(const GURL&)>& origin_filter,
+ base::Time delete_begin,
+ base::Time delete_end);
private:
sql::Connection* db_;

Powered by Google App Engine
This is Rietveld 408576698