Index: chrome/browser/profiles/profile_io_data.cc |
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc |
index 918f919b47b030184436454996ce342a4faaa57a..cf9b14cbe2e25490a8b995d4142c04f25c8cf8e3 100644 |
--- a/chrome/browser/profiles/profile_io_data.cc |
+++ b/chrome/browser/profiles/profile_io_data.cc |
@@ -71,9 +71,10 @@ |
#include "net/url_request/data_protocol_handler.h" |
#include "net/url_request/file_protocol_handler.h" |
#include "net/url_request/ftp_protocol_handler.h" |
-#include "net/url_request/protocol_intercept_job_factory.h" |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_file_job.h" |
+#include "net/url_request/url_request_intercepting_job_factory.h" |
+#include "net/url_request/url_request_interceptor.h" |
#include "net/url_request/url_request_job_factory_impl.h" |
#if defined(ENABLE_CONFIGURATION_POLICY) |
@@ -178,13 +179,13 @@ bool IsSupportedDevToolsURL(const GURL& url, base::FilePath* path) { |
return true; |
} |
-class DebugDevToolsInterceptor |
- : public net::URLRequestJobFactory::ProtocolHandler { |
+class DebugDevToolsInterceptor : public net::URLRequestInterceptor { |
public: |
DebugDevToolsInterceptor() {} |
virtual ~DebugDevToolsInterceptor() {} |
- virtual net::URLRequestJob* MaybeCreateJob( |
+ // net::URLRequestInterceptor implementation. |
+ virtual net::URLRequestJob* MaybeInterceptRequest( |
net::URLRequest* request, |
net::NetworkDelegate* network_delegate) const OVERRIDE { |
base::FilePath path; |
@@ -690,7 +691,7 @@ ChromeURLRequestContext* ProfileIOData::GetIsolatedAppRequestContext( |
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
protocol_handler_interceptor, |
content::ProtocolHandlerMap* protocol_handlers, |
- content::ProtocolHandlerScopedVector protocol_interceptors) const { |
+ content::URLRequestInterceptorScopedVector request_interceptors) const { |
DCHECK(initialized_); |
ChromeURLRequestContext* context = NULL; |
if (ContainsKey(app_request_context_map_, partition_descriptor)) { |
@@ -701,7 +702,7 @@ ChromeURLRequestContext* ProfileIOData::GetIsolatedAppRequestContext( |
partition_descriptor, |
protocol_handler_interceptor.Pass(), |
protocol_handlers, |
- protocol_interceptors.Pass()); |
+ request_interceptors.Pass()); |
app_request_context_map_[partition_descriptor] = context; |
} |
DCHECK(context); |
@@ -909,7 +910,7 @@ std::string ProfileIOData::GetSSLSessionCacheShard() { |
void ProfileIOData::Init( |
content::ProtocolHandlerMap* protocol_handlers, |
- content::ProtocolHandlerScopedVector protocol_interceptors) const { |
+ content::URLRequestInterceptorScopedVector request_interceptors) const { |
// The basic logic is implemented here. The specific initialization |
// is done in InitializeInternal(), implemented by subtypes. Static helper |
// functions have been provided to assist in common operations. |
@@ -1008,7 +1009,7 @@ void ProfileIOData::Init( |
#endif |
InitializeInternal( |
- profile_params_.get(), protocol_handlers, protocol_interceptors.Pass()); |
+ profile_params_.get(), protocol_handlers, request_interceptors.Pass()); |
profile_params_.reset(); |
initialized_ = true; |
@@ -1023,7 +1024,7 @@ void ProfileIOData::ApplyProfileParamsToContext( |
scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults( |
scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, |
- content::ProtocolHandlerScopedVector protocol_interceptors, |
+ content::URLRequestInterceptorScopedVector request_interceptors, |
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
protocol_handler_interceptor, |
net::NetworkDelegate* network_delegate, |
@@ -1072,20 +1073,20 @@ scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults( |
#endif // !defined(DISABLE_FTP_SUPPORT) |
#if defined(DEBUG_DEVTOOLS) |
- protocol_interceptors.push_back(new DebugDevToolsInterceptor); |
+ request_interceptors.push_back(new DebugDevToolsInterceptor); |
#endif |
// Set up interceptors in the reverse order. |
scoped_ptr<net::URLRequestJobFactory> top_job_factory = |
job_factory.PassAs<net::URLRequestJobFactory>(); |
- for (content::ProtocolHandlerScopedVector::reverse_iterator i = |
- protocol_interceptors.rbegin(); |
- i != protocol_interceptors.rend(); |
+ for (content::URLRequestInterceptorScopedVector::reverse_iterator i = |
+ request_interceptors.rbegin(); |
+ i != request_interceptors.rend(); |
++i) { |
- top_job_factory.reset(new net::ProtocolInterceptJobFactory( |
+ top_job_factory.reset(new net::URLRequestInterceptingJobFactory( |
top_job_factory.Pass(), make_scoped_ptr(*i))); |
} |
- protocol_interceptors.weak_clear(); |
+ request_interceptors.weak_clear(); |
if (protocol_handler_interceptor) { |
protocol_handler_interceptor->Chain(top_job_factory.Pass()); |