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

Unified Diff: components/domain_reliability/monitor.h

Issue 945923002: Fix memory leak and crash when parsing baked-in configs in domain reliability monitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « components/domain_reliability/config.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 d2bcd6dda9d8cdfadcdb1b9d3c8eba5cebf5652d..d89769260274a353a250bcfe4b2a675fc9e0dc11 100644
--- a/components/domain_reliability/monitor.h
+++ b/components/domain_reliability/monitor.h
@@ -49,14 +49,14 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor
// on which requests will actually be monitored and reported.
DomainReliabilityMonitor(
const std::string& upload_reporter_string,
- scoped_refptr<base::SingleThreadTaskRunner> pref_thread,
- scoped_refptr<base::SingleThreadTaskRunner> network_thread);
+ const scoped_refptr<base::SingleThreadTaskRunner>& pref_thread,
+ const scoped_refptr<base::SingleThreadTaskRunner>& network_thread);
// Same, but specifies a mock interface for time functions for testing.
DomainReliabilityMonitor(
const std::string& upload_reporter_string,
- scoped_refptr<base::SingleThreadTaskRunner> pref_thread,
- scoped_refptr<base::SingleThreadTaskRunner> network_thread,
+ const scoped_refptr<base::SingleThreadTaskRunner>& pref_thread,
+ const scoped_refptr<base::SingleThreadTaskRunner>& network_thread,
scoped_ptr<MockableTime> time);
// Must be called from the pref thread if |MoveToNetworkThread| was not
@@ -78,7 +78,8 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor
// Same, but for unittests where the Getter is readily available.
void InitURLRequestContext(
- scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
+ const scoped_refptr<net::URLRequestContextGetter>&
+ url_request_context_getter);
// Populates the monitor with contexts that were configured at compile time.
void AddBakedInConfigs();
« no previous file with comments | « components/domain_reliability/config.cc ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698