| 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_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 "googleurl/src/gurl.h" | |
| 9 #include "net/base/load_flags.h" | 8 #include "net/base/load_flags.h" |
| 10 #include "net/url_request/url_request_job_manager.h" | 9 #include "net/url_request/url_request_job_manager.h" |
| 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {} | 14 URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {} |
| 15 | 15 |
| 16 URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() { | 16 URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() { |
| 17 STLDeleteValues(&protocol_handler_map_); | 17 STLDeleteValues(&protocol_handler_map_); |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool URLRequestJobFactoryImpl::SetProtocolHandler( | 20 bool URLRequestJobFactoryImpl::SetProtocolHandler( |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find( | 74 ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find( |
| 75 location.scheme()); | 75 location.scheme()); |
| 76 if (it == protocol_handler_map_.end()) { | 76 if (it == protocol_handler_map_.end()) { |
| 77 // Unhandled cases are safely handled. | 77 // Unhandled cases are safely handled. |
| 78 return true; | 78 return true; |
| 79 } | 79 } |
| 80 return it->second->IsSafeRedirectTarget(location); | 80 return it->second->IsSafeRedirectTarget(location); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace net | 83 } // namespace net |
| OLD | NEW |