diff options
author | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-09 22:18:50 +0000 |
---|---|---|
committer | ttuttle@chromium.org <ttuttle@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-09 22:18:50 +0000 |
commit | 84d2a495da80a3d4b029d62a69be8323fd69008e (patch) | |
tree | 920b318b577dd39c01a80c8869bf3b941e3736da /components/domain_reliability/monitor.h | |
parent | fc223836c97763a1f98f0002037de71f24d90990 (diff) | |
download | chromium_src-84d2a495da80a3d4b029d62a69be8323fd69008e.zip chromium_src-84d2a495da80a3d4b029d62a69be8323fd69008e.tar.gz chromium_src-84d2a495da80a3d4b029d62a69be8323fd69008e.tar.bz2 |
Domain Reliability: More security review.
Change some trivial stuff so sleevi can do more security review.
Also, add rdsmith as an OWNER.
BUG=356791
Review URL: https://codereview.chromium.org/252613002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/domain_reliability/monitor.h')
-rw-r--r-- | components/domain_reliability/monitor.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/components/domain_reliability/monitor.h b/components/domain_reliability/monitor.h index 003a42c..e001a4b 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_; |