Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: net/url_request/url_request_intercepting_job_factory.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 URLRequestJob* URLRequestInterceptingJobFactory::MaybeInterceptRedirect(
36 URLRequest* request,
37 NetworkDelegate* network_delegate,
38 const GURL& location) const {
39 DCHECK(CalledOnValidThread());
40 URLRequestJob* job = interceptor_->MaybeInterceptRedirect(request,
41 network_delegate,
42 location);
43 if (job)
44 return job;
45 return job_factory_->MaybeInterceptRedirect(request,
46 network_delegate,
47 location);
48 }
49
50 URLRequestJob* URLRequestInterceptingJobFactory::MaybeInterceptResponse(
51 URLRequest* request,
52 NetworkDelegate* network_delegate) const {
53 DCHECK(CalledOnValidThread());
54 URLRequestJob* job = interceptor_->MaybeInterceptResponse(request,
55 network_delegate);
56 if (job)
57 return job;
58 return job_factory_->MaybeInterceptResponse(request,
59 network_delegate);
60 }
61
35 bool URLRequestInterceptingJobFactory::IsHandledProtocol( 62 bool URLRequestInterceptingJobFactory::IsHandledProtocol(
36 const std::string& scheme) const { 63 const std::string& scheme) const {
37 return job_factory_->IsHandledProtocol(scheme); 64 return job_factory_->IsHandledProtocol(scheme);
38 } 65 }
39 66
40 bool URLRequestInterceptingJobFactory::IsHandledURL(const GURL& url) const { 67 bool URLRequestInterceptingJobFactory::IsHandledURL(const GURL& url) const {
41 return job_factory_->IsHandledURL(url); 68 return job_factory_->IsHandledURL(url);
42 } 69 }
43 70
44 bool URLRequestInterceptingJobFactory::IsSafeRedirectTarget( 71 bool URLRequestInterceptingJobFactory::IsSafeRedirectTarget(
45 const GURL& location) const { 72 const GURL& location) const {
46 return job_factory_->IsSafeRedirectTarget(location); 73 return job_factory_->IsSafeRedirectTarget(location);
47 } 74 }
48 75
49 } // namespace net 76 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_intercepting_job_factory.h ('k') | net/url_request/url_request_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698