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/quic/quic_stream_factory.h" | 5 #include "net/quic/quic_stream_factory.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 HostResolver::RequestInfo(host_port_proxy_pair_.first), &address_list_, | 139 HostResolver::RequestInfo(host_port_proxy_pair_.first), &address_list_, |
140 base::Bind(&QuicStreamFactory::Job::OnIOComplete, | 140 base::Bind(&QuicStreamFactory::Job::OnIOComplete, |
141 base::Unretained(this)), | 141 base::Unretained(this)), |
142 net_log_); | 142 net_log_); |
143 } | 143 } |
144 | 144 |
145 int QuicStreamFactory::Job::DoResolveHostComplete(int rv) { | 145 int QuicStreamFactory::Job::DoResolveHostComplete(int rv) { |
146 if (rv != OK) | 146 if (rv != OK) |
147 return rv; | 147 return rv; |
148 | 148 |
| 149 // TODO(rch): remove this code! |
| 150 AddressList::iterator it = address_list_.begin(); |
| 151 while (it != address_list_.end()) { |
| 152 if (it->GetFamily() == ADDRESS_FAMILY_IPV6) { |
| 153 it = address_list_.erase(it); |
| 154 } else { |
| 155 it++; |
| 156 } |
| 157 } |
| 158 |
149 DCHECK(!factory_->HasActiveSession(host_port_proxy_pair_)); | 159 DCHECK(!factory_->HasActiveSession(host_port_proxy_pair_)); |
150 io_state_ = STATE_CONNECT; | 160 io_state_ = STATE_CONNECT; |
151 return OK; | 161 return OK; |
152 } | 162 } |
153 | 163 |
154 QuicStreamRequest::QuicStreamRequest(QuicStreamFactory* factory) | 164 QuicStreamRequest::QuicStreamRequest(QuicStreamFactory* factory) |
155 : factory_(factory) {} | 165 : factory_(factory) {} |
156 | 166 |
157 QuicStreamRequest::~QuicStreamRequest() { | 167 QuicStreamRequest::~QuicStreamRequest() { |
158 if (factory_ && !callback_.is_null()) | 168 if (factory_ && !callback_.is_null()) |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 DCHECK(crypto_config); | 426 DCHECK(crypto_config); |
417 } else { | 427 } else { |
418 crypto_config = new QuicCryptoClientConfig(); | 428 crypto_config = new QuicCryptoClientConfig(); |
419 crypto_config->SetDefaults(); | 429 crypto_config->SetDefaults(); |
420 all_crypto_configs_[host_port_proxy_pair] = crypto_config; | 430 all_crypto_configs_[host_port_proxy_pair] = crypto_config; |
421 } | 431 } |
422 return crypto_config; | 432 return crypto_config; |
423 } | 433 } |
424 | 434 |
425 } // namespace net | 435 } // namespace net |
OLD | NEW |