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

Unified Diff: components/domain_reliability/monitor.h

Issue 252613002: Domain Reliability: More security review. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ;_; Created 6 years, 7 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/domain_reliability_export.h ('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 003a42c2662dbb58b88d8ba97027d000fb5812e8..e001a4b08721be86cb1518c79fea7dfd65f6f723 100644
--- a/components/domain_reliability/monitor.h
+++ b/components/domain_reliability/monitor.h
@@ -29,26 +29,29 @@ class URLRequestContextGetter;
namespace domain_reliability {
-// The top-level per-profile object that measures requests and hands off the
-// measurements to the proper |DomainReliabilityContext|. Referenced by the
-// |ChromeNetworkDelegate|, which calls the On* methods.
+// The top-level object that measures requests and hands off the measurements
+// to the proper |DomainReliabilityContext|. Lives on the I/O thread, so the
+// constructor accepts a URLRequestContext directly instead of a
+// URLRequestContextGetter.
class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor {
public:
- // NB: We don't take a URLRequestContextGetter because we already live on the
- // I/O thread.
- explicit DomainReliabilityMonitor(
- net::URLRequestContext* url_request_context);
- DomainReliabilityMonitor(
- net::URLRequestContext* url_request_context,
- scoped_ptr<MockableTime> time);
+ DomainReliabilityMonitor(net::URLRequestContext* url_request_context,
+ const std::string& upload_reporter_string);
+ DomainReliabilityMonitor(net::URLRequestContext* url_request_context,
+ const std::string& upload_reporter_string,
+ scoped_ptr<MockableTime> time);
~DomainReliabilityMonitor();
- // Adds the "baked-in" configuration(s) for Google sites.
+ // Populates the monitor with contexts that were configured at compile time.
void AddBakedInConfigs();
- // Should be called from the profile's NetworkDelegate on the corresponding
- // events:
+ // Should be called when |request| is about to follow a redirect. Will
+ // examine and possibly log the redirect request.
void OnBeforeRedirect(net::URLRequest* request);
+
+ // Should be called when |request| is complete. Will examine and possibly
+ // log the (final) request. (|started| should be true if the request was
+ // actually started before it was terminated.)
void OnCompleted(net::URLRequest* request, bool started);
DomainReliabilityContext* AddContextForTesting(
@@ -86,6 +89,7 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityMonitor {
scoped_ptr<MockableTime> time_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
+ const std::string upload_reporter_string_;
DomainReliabilityScheduler::Params scheduler_params_;
DomainReliabilityDispatcher dispatcher_;
scoped_ptr<DomainReliabilityUploader> uploader_;
« no previous file with comments | « components/domain_reliability/domain_reliability_export.h ('k') | components/domain_reliability/monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698