OLD | NEW |
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.h" | 5 #include "net/url_request/url_request_job_factory.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
9 #include "net/base/load_flags.h" | 9 #include "net/base/load_flags.h" |
10 #include "net/url_request/url_request_job_manager.h" | 10 #include "net/url_request/url_request_job_manager.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 URLRequestJobFactory::ProtocolHandler::~ProtocolHandler() {} | 14 URLRequestJobFactory::ProtocolHandler::~ProtocolHandler() {} |
15 | 15 |
16 URLRequestJobFactory::Interceptor::~Interceptor() {} | 16 URLRequestJobFactory::Interceptor::~Interceptor() {} |
17 | 17 |
| 18 bool URLRequestJobFactory::Interceptor::WillHandleProtocol( |
| 19 const std::string& protocol) const { |
| 20 return false; |
| 21 } |
| 22 |
18 URLRequestJobFactory::URLRequestJobFactory() {} | 23 URLRequestJobFactory::URLRequestJobFactory() {} |
19 | 24 |
20 URLRequestJobFactory::~URLRequestJobFactory() { | 25 URLRequestJobFactory::~URLRequestJobFactory() { |
21 STLDeleteValues(&protocol_handler_map_); | 26 STLDeleteValues(&protocol_handler_map_); |
22 STLDeleteElements(&interceptors_); | 27 STLDeleteElements(&interceptors_); |
23 } | 28 } |
24 | 29 |
25 bool URLRequestJobFactory::SetProtocolHandler( | 30 bool URLRequestJobFactory::SetProtocolHandler( |
26 const std::string& scheme, | 31 const std::string& scheme, |
27 ProtocolHandler* protocol_handler) { | 32 ProtocolHandler* protocol_handler) { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 127 |
123 bool URLRequestJobFactory::IsHandledURL(const GURL& url) const { | 128 bool URLRequestJobFactory::IsHandledURL(const GURL& url) const { |
124 if (!url.is_valid()) { | 129 if (!url.is_valid()) { |
125 // We handle error cases. | 130 // We handle error cases. |
126 return true; | 131 return true; |
127 } | 132 } |
128 return IsHandledProtocol(url.scheme()); | 133 return IsHandledProtocol(url.scheme()); |
129 } | 134 } |
130 | 135 |
131 } // namespace net | 136 } // namespace net |
OLD | NEW |