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

Unified Diff: components/domain_reliability/monitor.h

Issue 2336043007: Domain Reliability: Don't crash on shutdown with uploads pending (Closed)
Patch Set: Remove outdated comment. Created 4 years 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 | « components/domain_reliability/dispatcher.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/domain_reliability/monitor.h
diff --git a/components/domain_reliability/monitor.h b/components/domain_reliability/monitor.h
index a5a27261f941615b19f2a1496a18898908a34e86..29ba9935e18eb85950262d44f80f5ccc6f3dce8b 100644
--- a/components/domain_reliability/monitor.h
+++ b/components/domain_reliability/monitor.h
@@ -88,6 +88,10 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor
const scoped_refptr<net::URLRequestContextGetter>&
url_request_context_getter);
+ // Shuts down the monitor prior to destruction. Currently, ensures that there
+ // are no pending uploads, to avoid hairy lifetime issues at destruction.
+ void Shutdown();
+
// Populates the monitor with contexts that were configured at compile time.
void AddBakedInConfigs();
@@ -130,6 +134,10 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor
return context_manager_.contexts_size_for_testing();
}
+ // Forces all pending uploads to run now, even if their minimum delay has not
+ // yet passed.
+ void ForceUploadsForTesting();
+
// DomainReliabilityContext::Factory implementation:
std::unique_ptr<DomainReliabilityContext> CreateContextForConfig(
std::unique_ptr<const DomainReliabilityConfig> config) override;
« no previous file with comments | « components/domain_reliability/dispatcher.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698