Chromium Code Reviews| Index: net/proxy/proxy_script_fetcher_impl_unittest.cc |
| diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc |
| index a061beaffd07a3f97aae61ebb5d64a1075754f24..d354679d7e520238e31cca8c80bf9abbd92e391f 100644 |
| --- a/net/proxy/proxy_script_fetcher_impl_unittest.cc |
| +++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc |
| @@ -21,6 +21,7 @@ |
| #include "net/http/http_network_session.h" |
| #include "net/http/http_server_properties_impl.h" |
| #include "net/test/test_server.h" |
| +#include "net/url_request/protocol_intercept_job_factory.h" |
| #include "net/url_request/url_request_context_storage.h" |
| #include "net/url_request/url_request_file_job.h" |
| #include "net/url_request/url_request_job_factory_impl.h" |
| @@ -47,25 +48,13 @@ struct FetchResult { |
| // CheckNoRevocationFlagSetInterceptor causes a test failure if a request is |
| // seen that doesn't set a load flag to bypass revocation checking. |
| class CheckNoRevocationFlagSetInterceptor : |
| - public URLRequestJobFactory::Interceptor { |
| + public URLRequestJobFactory::ProtocolHandler { |
|
mmenke
2012/12/13 16:12:04
Should we get rid of this, in favor of doing the c
|
| public: |
| - virtual URLRequestJob* MaybeIntercept( |
| + virtual URLRequestJob* MaybeCreateJob( |
| URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE { |
| EXPECT_TRUE(request->load_flags() & LOAD_DISABLE_CERT_REVOCATION_CHECKING); |
| return NULL; |
| } |
| - |
| - virtual URLRequestJob* MaybeInterceptRedirect( |
| - const GURL& location, |
| - URLRequest* request, |
| - NetworkDelegate* network_delegate) const OVERRIDE { |
| - return NULL; |
| - } |
| - |
| - virtual URLRequestJob* MaybeInterceptResponse( |
| - URLRequest* request, NetworkDelegate* network_delegate) const OVERRIDE { |
| - return NULL; |
| - } |
| }; |
| // A non-mock URL request which can access http:// and file:// urls. |
| @@ -90,9 +79,10 @@ class RequestContext : public URLRequestContext { |
| storage_.set_http_transaction_factory(new HttpCache( |
| network_session, |
| HttpCache::DefaultBackend::InMemory(0))); |
| - scoped_ptr<URLRequestJobFactoryImpl> factory(new URLRequestJobFactoryImpl); |
| - factory->AddInterceptor(new CheckNoRevocationFlagSetInterceptor); |
| - url_request_job_factory_ = factory.Pass(); |
| + url_request_job_factory_.reset(new ProtocolInterceptJobFactory( |
| + scoped_ptr<URLRequestJobFactory>(new URLRequestJobFactoryImpl()), |
| + scoped_ptr<URLRequestJobFactory::ProtocolHandler>( |
| + new CheckNoRevocationFlagSetInterceptor()))); |
| set_job_factory(url_request_job_factory_.get()); |
| } |