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

Unified Diff: components/domain_reliability/context_manager.h

Issue 2132563003: Implement origin-based deletion for the domain reliability service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated DomainReliabilityMonitorTest Created 4 years, 5 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/domain_reliability/context_manager.h
diff --git a/components/domain_reliability/context_manager.h b/components/domain_reliability/context_manager.h
index 7691b0518fd005ec49f0a086e50d769c6be2abb3..3d3aaead3ea6f7e817026f95391a88437d76391b 100644
--- a/components/domain_reliability/context_manager.h
+++ b/components/domain_reliability/context_manager.h
@@ -37,9 +37,11 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContextManager {
base::TimeDelta max_age);
void ClearConfig(const GURL& origin);
- // Calls |ClearBeacons| on all contexts added to this manager, but leaves
- // the contexts themselves intact.
- void ClearBeaconsInAllContexts();
+ // Calls |ClearBeacons| on all contexts matched by |origin_filter| added
+ // to this manager, but leaves the contexts themselves intact. A null
+ // |origin_filter| is interpreted as an always-true filter, indicating
+ // complete deletion.
+ void ClearBeacons(const base::Callback<bool(const GURL&)>& origin_filter);
// TODO(juliatuttle): Once unit tests test ContextManager directly, they can
// use a custom Context::Factory to get the created Context, and this can be
@@ -47,9 +49,10 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContextManager {
DomainReliabilityContext* AddContextForConfig(
std::unique_ptr<const DomainReliabilityConfig> config);
- // Removes all contexts from this manager (discarding all queued beacons in
- // the process).
- void RemoveAllContexts();
+ // Removes all contexts matched by |origin_filter| from this manager
+ // (discarding all queued beacons in the process). A null |origin_filter|
+ // is interpreted as an always-true filter, indicating complete deletion.
+ void RemoveContexts(const base::Callback<bool(const GURL&)>& origin_filter);
std::unique_ptr<base::Value> GetWebUIData() const;
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover_unittest.cc ('k') | components/domain_reliability/context_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698