Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/url_request/url_request_intercepting_job_factory.h" | 5 #include "net/url_request/url_request_intercepting_job_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/url_request/url_request_interceptor.h" | 8 #include "net/url_request/url_request_interceptor.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 NetworkDelegate* network_delegate) const { | 25 NetworkDelegate* network_delegate) const { |
| 26 DCHECK(CalledOnValidThread()); | 26 DCHECK(CalledOnValidThread()); |
| 27 URLRequestJob* job = interceptor_->MaybeInterceptRequest(request, | 27 URLRequestJob* job = interceptor_->MaybeInterceptRequest(request, |
| 28 network_delegate); | 28 network_delegate); |
| 29 if (job) | 29 if (job) |
| 30 return job; | 30 return job; |
| 31 return job_factory_->MaybeCreateJobWithProtocolHandler( | 31 return job_factory_->MaybeCreateJobWithProtocolHandler( |
| 32 scheme, request, network_delegate); | 32 scheme, request, network_delegate); |
| 33 } | 33 } |
| 34 | 34 |
| 35 net::URLRequestJob* URLRequestInterceptingJobFactory::MaybeInterceptResponse( | |
| 36 net::URLRequest* request, | |
| 37 net::NetworkDelegate* network_delegate) const { | |
| 38 return interceptor_->MaybeInterceptResponse(request, | |
| 39 network_delegate); | |
|
mmenke
2014/10/30 19:59:24
These aren't right. These should work just like M
bengr
2014/10/31 00:45:31
Right. Done.
| |
| 40 } | |
| 41 | |
| 42 net::URLRequestJob* URLRequestInterceptingJobFactory::MaybeInterceptRedirect( | |
| 43 net::URLRequest* request, | |
| 44 net::NetworkDelegate* network_delegate, | |
| 45 const GURL& location) const { | |
| 46 return interceptor_->MaybeInterceptRedirect(request, | |
| 47 network_delegate, | |
| 48 location); | |
| 49 } | |
| 50 | |
| 35 bool URLRequestInterceptingJobFactory::IsHandledProtocol( | 51 bool URLRequestInterceptingJobFactory::IsHandledProtocol( |
| 36 const std::string& scheme) const { | 52 const std::string& scheme) const { |
| 37 return job_factory_->IsHandledProtocol(scheme); | 53 return job_factory_->IsHandledProtocol(scheme); |
| 38 } | 54 } |
| 39 | 55 |
| 40 bool URLRequestInterceptingJobFactory::IsHandledURL(const GURL& url) const { | 56 bool URLRequestInterceptingJobFactory::IsHandledURL(const GURL& url) const { |
| 41 return job_factory_->IsHandledURL(url); | 57 return job_factory_->IsHandledURL(url); |
| 42 } | 58 } |
| 43 | 59 |
| 44 bool URLRequestInterceptingJobFactory::IsSafeRedirectTarget( | 60 bool URLRequestInterceptingJobFactory::IsSafeRedirectTarget( |
| 45 const GURL& location) const { | 61 const GURL& location) const { |
| 46 return job_factory_->IsSafeRedirectTarget(location); | 62 return job_factory_->IsSafeRedirectTarget(location); |
| 47 } | 63 } |
| 48 | 64 |
| 49 } // namespace net | 65 } // namespace net |
| OLD | NEW |