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/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 base::StringPiece method, | 545 base::StringPiece method, |
546 const BoundNetLog& net_log, | 546 const BoundNetLog& net_log, |
547 const CompletionCallback& callback) { | 547 const CompletionCallback& callback) { |
548 DCHECK(!stream_); | 548 DCHECK(!stream_); |
549 DCHECK(callback_.is_null()); | 549 DCHECK(callback_.is_null()); |
550 DCHECK(factory_); | 550 DCHECK(factory_); |
551 int rv = factory_->Create(host_port_pair, is_https, privacy_mode, method, | 551 int rv = factory_->Create(host_port_pair, is_https, privacy_mode, method, |
552 net_log, this); | 552 net_log, this); |
553 if (rv == ERR_IO_PENDING) { | 553 if (rv == ERR_IO_PENDING) { |
554 host_port_pair_ = host_port_pair; | 554 host_port_pair_ = host_port_pair; |
555 is_https_ = is_https; | |
556 net_log_ = net_log; | 555 net_log_ = net_log; |
557 callback_ = callback; | 556 callback_ = callback; |
558 } else { | 557 } else { |
559 factory_ = nullptr; | 558 factory_ = nullptr; |
560 } | 559 } |
561 if (rv == OK) | 560 if (rv == OK) |
562 DCHECK(stream_); | 561 DCHECK(stream_); |
563 return rv; | 562 return rv; |
564 } | 563 } |
565 | 564 |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 http_server_properties_->ClearAlternateProtocol(server); | 1352 http_server_properties_->ClearAlternateProtocol(server); |
1354 http_server_properties_->SetAlternateProtocol( | 1353 http_server_properties_->SetAlternateProtocol( |
1355 server, alternate.port, alternate.protocol, 1); | 1354 server, alternate.port, alternate.protocol, 1); |
1356 DCHECK_EQ(QUIC, | 1355 DCHECK_EQ(QUIC, |
1357 http_server_properties_->GetAlternateProtocol(server).protocol); | 1356 http_server_properties_->GetAlternateProtocol(server).protocol); |
1358 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 1357 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
1359 server)); | 1358 server)); |
1360 } | 1359 } |
1361 | 1360 |
1362 } // namespace net | 1361 } // namespace net |
OLD | NEW |