| Index: net/url_request/url_request_job_factory_impl.cc
|
| diff --git a/net/url_request/url_request_job_factory.cc b/net/url_request/url_request_job_factory_impl.cc
|
| similarity index 77%
|
| copy from net/url_request/url_request_job_factory.cc
|
| copy to net/url_request/url_request_job_factory_impl.cc
|
| index 4961c03b19a33faf77bb847c0403a06a30f5ad17..aaeed79132b443ead616f4b3e0d360f6de03c328 100644
|
| --- a/net/url_request/url_request_job_factory.cc
|
| +++ b/net/url_request/url_request_job_factory_impl.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "net/url_request/url_request_job_factory.h"
|
| +#include "net/url_request/url_request_job_factory_impl.h"
|
|
|
| #include "base/stl_util.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -11,23 +11,14 @@
|
|
|
| namespace net {
|
|
|
| -URLRequestJobFactory::ProtocolHandler::~ProtocolHandler() {}
|
| +URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {}
|
|
|
| -URLRequestJobFactory::Interceptor::~Interceptor() {}
|
| -
|
| -bool URLRequestJobFactory::Interceptor::WillHandleProtocol(
|
| - const std::string& protocol) const {
|
| - return false;
|
| -}
|
| -
|
| -URLRequestJobFactory::URLRequestJobFactory() {}
|
| -
|
| -URLRequestJobFactory::~URLRequestJobFactory() {
|
| +URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {
|
| STLDeleteValues(&protocol_handler_map_);
|
| STLDeleteElements(&interceptors_);
|
| }
|
|
|
| -bool URLRequestJobFactory::SetProtocolHandler(
|
| +bool URLRequestJobFactoryImpl::SetProtocolHandler(
|
| const std::string& scheme,
|
| ProtocolHandler* protocol_handler) {
|
| DCHECK(CalledOnValidThread());
|
| @@ -48,14 +39,14 @@ bool URLRequestJobFactory::SetProtocolHandler(
|
| return true;
|
| }
|
|
|
| -void URLRequestJobFactory::AddInterceptor(Interceptor* interceptor) {
|
| +void URLRequestJobFactoryImpl::AddInterceptor(Interceptor* interceptor) {
|
| DCHECK(CalledOnValidThread());
|
| CHECK(interceptor);
|
|
|
| interceptors_.push_back(interceptor);
|
| }
|
|
|
| -URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithInterceptor(
|
| +URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithInterceptor(
|
| URLRequest* request, NetworkDelegate* network_delegate) const {
|
| DCHECK(CalledOnValidThread());
|
| URLRequestJob* job = NULL;
|
| @@ -71,7 +62,7 @@ URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithInterceptor(
|
| return NULL;
|
| }
|
|
|
| -URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
|
| +URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithProtocolHandler(
|
| const std::string& scheme,
|
| URLRequest* request,
|
| NetworkDelegate* network_delegate) const {
|
| @@ -82,7 +73,7 @@ URLRequestJob* URLRequestJobFactory::MaybeCreateJobWithProtocolHandler(
|
| return it->second->MaybeCreateJob(request, network_delegate);
|
| }
|
|
|
| -URLRequestJob* URLRequestJobFactory::MaybeInterceptRedirect(
|
| +URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptRedirect(
|
| const GURL& location,
|
| URLRequest* request,
|
| NetworkDelegate* network_delegate) const {
|
| @@ -100,7 +91,7 @@ URLRequestJob* URLRequestJobFactory::MaybeInterceptRedirect(
|
| return NULL;
|
| }
|
|
|
| -URLRequestJob* URLRequestJobFactory::MaybeInterceptResponse(
|
| +URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptResponse(
|
| URLRequest* request, NetworkDelegate* network_delegate) const {
|
| DCHECK(CalledOnValidThread());
|
| URLRequestJob* job = NULL;
|
| @@ -116,7 +107,8 @@ URLRequestJob* URLRequestJobFactory::MaybeInterceptResponse(
|
| return NULL;
|
| }
|
|
|
| -bool URLRequestJobFactory::IsHandledProtocol(const std::string& scheme) const {
|
| +bool URLRequestJobFactoryImpl::IsHandledProtocol(
|
| + const std::string& scheme) const {
|
| DCHECK(CalledOnValidThread());
|
| InterceptorList::const_iterator i;
|
| for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
|
| @@ -127,7 +119,7 @@ bool URLRequestJobFactory::IsHandledProtocol(const std::string& scheme) const {
|
| URLRequestJobManager::GetInstance()->SupportsScheme(scheme);
|
| }
|
|
|
| -bool URLRequestJobFactory::IsHandledURL(const GURL& url) const {
|
| +bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const {
|
| if (!url.is_valid()) {
|
| // We handle error cases.
|
| return true;
|
|
|