| Index: net/url_request/url_request_job_factory_impl.cc
|
| diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
|
| index aaeed79132b443ead616f4b3e0d360f6de03c328..f4c1d01fbd730ad106e2bdc6da13d37a2f580c19 100644
|
| --- a/net/url_request/url_request_job_factory_impl.cc
|
| +++ b/net/url_request/url_request_job_factory_impl.cc
|
| @@ -15,7 +15,6 @@ URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {}
|
|
|
| URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {
|
| STLDeleteValues(&protocol_handler_map_);
|
| - STLDeleteElements(&interceptors_);
|
| }
|
|
|
| bool URLRequestJobFactoryImpl::SetProtocolHandler(
|
| @@ -39,29 +38,6 @@ bool URLRequestJobFactoryImpl::SetProtocolHandler(
|
| return true;
|
| }
|
|
|
| -void URLRequestJobFactoryImpl::AddInterceptor(Interceptor* interceptor) {
|
| - DCHECK(CalledOnValidThread());
|
| - CHECK(interceptor);
|
| -
|
| - interceptors_.push_back(interceptor);
|
| -}
|
| -
|
| -URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithInterceptor(
|
| - URLRequest* request, NetworkDelegate* network_delegate) const {
|
| - DCHECK(CalledOnValidThread());
|
| - URLRequestJob* job = NULL;
|
| -
|
| - if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
|
| - InterceptorList::const_iterator i;
|
| - for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
|
| - job = (*i)->MaybeIntercept(request, network_delegate);
|
| - if (job)
|
| - return job;
|
| - }
|
| - }
|
| - return NULL;
|
| -}
|
| -
|
| URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithProtocolHandler(
|
| const std::string& scheme,
|
| URLRequest* request,
|
| @@ -73,48 +49,9 @@ URLRequestJob* URLRequestJobFactoryImpl::MaybeCreateJobWithProtocolHandler(
|
| return it->second->MaybeCreateJob(request, network_delegate);
|
| }
|
|
|
| -URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptRedirect(
|
| - const GURL& location,
|
| - URLRequest* request,
|
| - NetworkDelegate* network_delegate) const {
|
| - DCHECK(CalledOnValidThread());
|
| - URLRequestJob* job = NULL;
|
| -
|
| - if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
|
| - InterceptorList::const_iterator i;
|
| - for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
|
| - job = (*i)->MaybeInterceptRedirect(location, request, network_delegate);
|
| - if (job)
|
| - return job;
|
| - }
|
| - }
|
| - return NULL;
|
| -}
|
| -
|
| -URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptResponse(
|
| - URLRequest* request, NetworkDelegate* network_delegate) const {
|
| - DCHECK(CalledOnValidThread());
|
| - URLRequestJob* job = NULL;
|
| -
|
| - if (!(request->load_flags() & LOAD_DISABLE_INTERCEPT)) {
|
| - InterceptorList::const_iterator i;
|
| - for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
|
| - job = (*i)->MaybeInterceptResponse(request, network_delegate);
|
| - if (job)
|
| - return job;
|
| - }
|
| - }
|
| - return NULL;
|
| -}
|
| -
|
| bool URLRequestJobFactoryImpl::IsHandledProtocol(
|
| const std::string& scheme) const {
|
| DCHECK(CalledOnValidThread());
|
| - InterceptorList::const_iterator i;
|
| - for (i = interceptors_.begin(); i != interceptors_.end(); ++i) {
|
| - if ((*i)->WillHandleProtocol(scheme))
|
| - return true;
|
| - }
|
| return ContainsKey(protocol_handler_map_, scheme) ||
|
| URLRequestJobManager::GetInstance()->SupportsScheme(scheme);
|
| }
|
|
|