| Index: net/url_request/url_request_intercepting_job_factory.cc
|
| diff --git a/net/url_request/protocol_intercept_job_factory.cc b/net/url_request/url_request_intercepting_job_factory.cc
|
| similarity index 51%
|
| rename from net/url_request/protocol_intercept_job_factory.cc
|
| rename to net/url_request/url_request_intercepting_job_factory.cc
|
| index d0f92f4bff376c1c7a26cacdb92ab0cca31b16be..d22a00adcaeb41ac78b0616125366787f55b6171 100644
|
| --- a/net/url_request/protocol_intercept_job_factory.cc
|
| +++ b/net/url_request/url_request_intercepting_job_factory.cc
|
| @@ -2,44 +2,46 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "net/url_request/protocol_intercept_job_factory.h"
|
| +#include "net/url_request/url_request_intercepting_job_factory.h"
|
|
|
| #include "base/logging.h"
|
| +#include "net/url_request/url_request_interceptor.h"
|
|
|
| namespace net {
|
|
|
| -ProtocolInterceptJobFactory::ProtocolInterceptJobFactory(
|
| +URLRequestInterceptingJobFactory::URLRequestInterceptingJobFactory(
|
| scoped_ptr<URLRequestJobFactory> job_factory,
|
| - scoped_ptr<ProtocolHandler> protocol_handler)
|
| + scoped_ptr<URLRequestInterceptor> interceptor)
|
| : job_factory_(job_factory.Pass()),
|
| - protocol_handler_(protocol_handler.Pass()) {
|
| + interceptor_(interceptor.Pass()) {
|
| }
|
|
|
| -ProtocolInterceptJobFactory::~ProtocolInterceptJobFactory() {}
|
| +URLRequestInterceptingJobFactory::~URLRequestInterceptingJobFactory() {}
|
|
|
| -URLRequestJob* ProtocolInterceptJobFactory::MaybeCreateJobWithProtocolHandler(
|
| +URLRequestJob* URLRequestInterceptingJobFactory::
|
| +MaybeCreateJobWithProtocolHandler(
|
| const std::string& scheme,
|
| URLRequest* request,
|
| NetworkDelegate* network_delegate) const {
|
| DCHECK(CalledOnValidThread());
|
| - URLRequestJob* job = protocol_handler_->MaybeCreateJob(request,
|
| - network_delegate);
|
| + URLRequestJob* job = interceptor_->MaybeInterceptRequest(request,
|
| + network_delegate);
|
| if (job)
|
| return job;
|
| return job_factory_->MaybeCreateJobWithProtocolHandler(
|
| scheme, request, network_delegate);
|
| }
|
|
|
| -bool ProtocolInterceptJobFactory::IsHandledProtocol(
|
| +bool URLRequestInterceptingJobFactory::IsHandledProtocol(
|
| const std::string& scheme) const {
|
| return job_factory_->IsHandledProtocol(scheme);
|
| }
|
|
|
| -bool ProtocolInterceptJobFactory::IsHandledURL(const GURL& url) const {
|
| +bool URLRequestInterceptingJobFactory::IsHandledURL(const GURL& url) const {
|
| return job_factory_->IsHandledURL(url);
|
| }
|
|
|
| -bool ProtocolInterceptJobFactory::IsSafeRedirectTarget(
|
| +bool URLRequestInterceptingJobFactory::IsSafeRedirectTarget(
|
| const GURL& location) const {
|
| return job_factory_->IsSafeRedirectTarget(location);
|
| }
|
|
|