diff options
author | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 17:04:23 +0000 |
---|---|---|
committer | pauljensen@chromium.org <pauljensen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-20 17:04:23 +0000 |
commit | f53b48075849f4f7d7e13002176cb861c885ab52 (patch) | |
tree | cc3429420ba40da37ffc7adad0ad63ce65fc42d5 /chrome/browser/net/connect_interceptor.h | |
parent | 4e4a42657994b3752962232ef8746d3f4ac70931 (diff) | |
download | chromium_src-f53b48075849f4f7d7e13002176cb861c885ab52.zip chromium_src-f53b48075849f4f7d7e13002176cb861c885ab52.tar.gz chromium_src-f53b48075849f4f7d7e13002176cb861c885ab52.tar.bz2 |
Convert trivial URLRequest::Interceptors and URLRequestJobFactory::Interceptor into URLRequestJobFactory::ProtocolHandlers.
BUG=161524
Review URL: https://codereview.chromium.org/11293252
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/connect_interceptor.h')
-rw-r--r-- | chrome/browser/net/connect_interceptor.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/chrome/browser/net/connect_interceptor.h b/chrome/browser/net/connect_interceptor.h index afc27af..3372ad8 100644 --- a/chrome/browser/net/connect_interceptor.h +++ b/chrome/browser/net/connect_interceptor.h @@ -7,8 +7,14 @@ #include "base/containers/mru_cache.h" #include "base/gtest_prod_util.h" +#include "base/memory/scoped_ptr.h" #include "base/time.h" -#include "net/url_request/url_request_job_factory.h" + +class GURL; + +namespace net { +class URLRequest; +} namespace chrome_browser_net { @@ -17,26 +23,15 @@ class Predictor; //------------------------------------------------------------------------------ // An interceptor to monitor URLRequests so that we can do speculative DNS // resolution and/or speculative TCP preconnections. -class ConnectInterceptor : public net::URLRequestJobFactory::Interceptor { +class ConnectInterceptor { public: // Construction includes registration as an URL. explicit ConnectInterceptor(Predictor* predictor); // Destruction includes unregistering. virtual ~ConnectInterceptor(); - protected: - // Overridden from net::URLRequest::Interceptor: // Learn about referrers, and optionally preconnect based on history. - virtual net::URLRequestJob* MaybeIntercept( - net::URLRequest* request, - net::NetworkDelegate* network_delegate) const OVERRIDE; - virtual net::URLRequestJob* MaybeInterceptResponse( - net::URLRequest* request, - net::NetworkDelegate* network_delegate) const OVERRIDE; - virtual net::URLRequestJob* MaybeInterceptRedirect( - const GURL& location, - net::URLRequest* request, - net::NetworkDelegate* network_delegate) const OVERRIDE; + void WitnessURLRequest(net::URLRequest* request) const; private: // Provide access to local class TimedCache for testing. |