| Index: chrome/browser/net/connect_interceptor.h
|
| diff --git a/chrome/browser/net/connect_interceptor.h b/chrome/browser/net/connect_interceptor.h
|
| index afc27af9e01c16d1533c9974dae5053ee9b7874c..7d40ea26613e11dec634820dd045343b098647af 100644
|
| --- a/chrome/browser/net/connect_interceptor.h
|
| +++ b/chrome/browser/net/connect_interceptor.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #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"
|
|
|
| @@ -17,28 +18,25 @@ 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 net::URLRequestJobFactory::ProtocolHandler {
|
| public:
|
| - // Construction includes registration as an URL.
|
| - explicit ConnectInterceptor(Predictor* predictor);
|
| + // Creation includes registration as an URL.
|
| + static scoped_ptr<net::URLRequestJobFactory> CreateURLRequestJobFactory(
|
| + scoped_ptr<net::URLRequestJobFactory> base_job_factory,
|
| + Predictor* predictor);
|
| // Destruction includes unregistering.
|
| virtual ~ConnectInterceptor();
|
|
|
| protected:
|
| - // Overridden from net::URLRequest::Interceptor:
|
| + // Overridden from net::URLRequestJobFactory::ProtocolHandler:
|
| // 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,
|
| + virtual net::URLRequestJob* MaybeCreateJob(
|
| net::URLRequest* request,
|
| net::NetworkDelegate* network_delegate) const OVERRIDE;
|
|
|
| private:
|
| + explicit ConnectInterceptor(Predictor* predictor);
|
| +
|
| // Provide access to local class TimedCache for testing.
|
| FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheRecall);
|
| FRIEND_TEST_ALL_PREFIXES(ConnectInterceptorTest, TimedCacheEviction);
|
|
|