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

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

Issue 1868763002: Remove URLRequest::IsHandledProtocol and IsHandledURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (needs fixing) Created 4 years, 2 months 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_job_factory_impl.h" 5 #include "net/url_request/url_request_job_factory_impl.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/base/load_flags.h" 8 #include "net/base/load_flags.h"
9 #include "net/url_request/url_request_interceptor.h" 9 #include "net/url_request/url_request_interceptor.h"
10 #include "net/url_request/url_request_job_manager.h" 10 #include "net/url_request/url_request_job_manager.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptResponse( 70 URLRequestJob* URLRequestJobFactoryImpl::MaybeInterceptResponse(
71 URLRequest* request, 71 URLRequest* request,
72 NetworkDelegate* network_delegate) const { 72 NetworkDelegate* network_delegate) const {
73 return nullptr; 73 return nullptr;
74 } 74 }
75 75
76 bool URLRequestJobFactoryImpl::IsHandledProtocol( 76 bool URLRequestJobFactoryImpl::IsHandledProtocol(
77 const std::string& scheme) const { 77 const std::string& scheme) const {
78 DCHECK(CalledOnValidThread()); 78 DCHECK(CalledOnValidThread());
79 return base::ContainsKey(protocol_handler_map_, scheme) || 79 return base::ContainsKey(protocol_handler_map_, scheme) ||
80 URLRequestJobManager::GetInstance()->SupportsScheme(scheme); 80 URLRequestJobManager::SupportsScheme(scheme);
81 } 81 }
82 82
83 bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const { 83 bool URLRequestJobFactoryImpl::IsHandledURL(const GURL& url) const {
84 if (!url.is_valid()) { 84 if (!url.is_valid()) {
85 // We handle error cases. 85 // We handle error cases.
86 return true; 86 return true;
87 } 87 }
88 return IsHandledProtocol(url.scheme()); 88 return IsHandledProtocol(url.scheme());
89 } 89 }
90 90
(...skipping 15 matching lines...) Expand all
106 106
107 // static 107 // static
108 void URLRequestJobFactoryImpl::SetInterceptorForTesting( 108 void URLRequestJobFactoryImpl::SetInterceptorForTesting(
109 URLRequestInterceptor* interceptor) { 109 URLRequestInterceptor* interceptor) {
110 DCHECK(!interceptor || !g_interceptor_for_testing); 110 DCHECK(!interceptor || !g_interceptor_for_testing);
111 111
112 g_interceptor_for_testing = interceptor; 112 g_interceptor_for_testing = interceptor;
113 } 113 }
114 114
115 } // namespace net 115 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698