| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/http/http_stream_factory_impl.h" | 5 #include "net/http/http_stream_factory_impl.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 proxy_ssl_config, session_->net_log()); | 112 proxy_ssl_config, session_->net_log()); |
| 113 job->MarkAsAlternate(request_info.url); | 113 job->MarkAsAlternate(request_info.url); |
| 114 } else { | 114 } else { |
| 115 job = new Job(this, session_, request_info, server_ssl_config, | 115 job = new Job(this, session_, request_info, server_ssl_config, |
| 116 proxy_ssl_config, session_->net_log()); | 116 proxy_ssl_config, session_->net_log()); |
| 117 } | 117 } |
| 118 preconnect_job_set_.insert(job); | 118 preconnect_job_set_.insert(job); |
| 119 job->Preconnect(num_streams); | 119 job->Preconnect(num_streams); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void HttpStreamFactoryImpl::AddTLSIntolerantServer(const HostPortPair& server) { | |
| 123 tls_intolerant_servers_.insert(server); | |
| 124 } | |
| 125 | |
| 126 bool HttpStreamFactoryImpl::IsTLSIntolerantServer( | |
| 127 const HostPortPair& server) const { | |
| 128 return ContainsKey(tls_intolerant_servers_, server); | |
| 129 } | |
| 130 | |
| 131 base::Value* HttpStreamFactoryImpl::PipelineInfoToValue() const { | 122 base::Value* HttpStreamFactoryImpl::PipelineInfoToValue() const { |
| 132 return http_pipelined_host_pool_.PipelineInfoToValue(); | 123 return http_pipelined_host_pool_.PipelineInfoToValue(); |
| 133 } | 124 } |
| 134 | 125 |
| 135 bool HttpStreamFactoryImpl::GetAlternateProtocolRequestFor( | 126 bool HttpStreamFactoryImpl::GetAlternateProtocolRequestFor( |
| 136 const GURL& original_url, | 127 const GURL& original_url, |
| 137 GURL* alternate_url) const { | 128 GURL* alternate_url) const { |
| 138 if (!spdy_enabled()) | 129 if (!spdy_enabled()) |
| 139 return false; | 130 return false; |
| 140 | 131 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 it != requests_to_fail.end(); ++it) { | 254 it != requests_to_fail.end(); ++it) { |
| 264 Request* request = *it; | 255 Request* request = *it; |
| 265 if (request == request_map_[job]) { | 256 if (request == request_map_[job]) { |
| 266 continue; | 257 continue; |
| 267 } | 258 } |
| 268 request->OnStreamFailed(NULL, status, used_ssl_config); | 259 request->OnStreamFailed(NULL, status, used_ssl_config); |
| 269 } | 260 } |
| 270 } | 261 } |
| 271 | 262 |
| 272 } // namespace net | 263 } // namespace net |
| OLD | NEW |