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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 if (base::win::GetVersion() < base::win::VERSION_VISTA) | 81 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
82 return false; | 82 return false; |
83 #endif | 83 #endif |
84 | 84 |
85 return true; | 85 return true; |
86 } | 86 } |
87 | 87 |
88 QuicConfig InitializeQuicConfig(const QuicTagVector& connection_options) { | 88 QuicConfig InitializeQuicConfig(const QuicTagVector& connection_options) { |
89 QuicConfig config; | 89 QuicConfig config; |
90 config.SetDefaults(); | 90 config.SetDefaults(); |
91 config.set_idle_connection_state_lifetime( | 91 config.SetIdleConnectionStateLifetime( |
92 QuicTime::Delta::FromSeconds(kIdleConnectionTimeoutSeconds), | 92 QuicTime::Delta::FromSeconds(kIdleConnectionTimeoutSeconds), |
93 QuicTime::Delta::FromSeconds(kIdleConnectionTimeoutSeconds)); | 93 QuicTime::Delta::FromSeconds(kIdleConnectionTimeoutSeconds)); |
94 config.SetConnectionOptionsToSend(connection_options); | 94 config.SetConnectionOptionsToSend(connection_options); |
95 return config; | 95 return config; |
96 } | 96 } |
97 | 97 |
98 class DefaultPacketWriterFactory : public QuicConnection::PacketWriterFactory { | 98 class DefaultPacketWriterFactory : public QuicConnection::PacketWriterFactory { |
99 public: | 99 public: |
100 explicit DefaultPacketWriterFactory(DatagramClientSocket* socket) | 100 explicit DefaultPacketWriterFactory(DatagramClientSocket* socket) |
101 : socket_(socket) {} | 101 : socket_(socket) {} |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 http_server_properties_->ClearAlternateProtocol(server); | 998 http_server_properties_->ClearAlternateProtocol(server); |
999 http_server_properties_->SetAlternateProtocol( | 999 http_server_properties_->SetAlternateProtocol( |
1000 server, alternate.port, alternate.protocol, 1); | 1000 server, alternate.port, alternate.protocol, 1); |
1001 DCHECK_EQ(QUIC, | 1001 DCHECK_EQ(QUIC, |
1002 http_server_properties_->GetAlternateProtocol(server).protocol); | 1002 http_server_properties_->GetAlternateProtocol(server).protocol); |
1003 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( | 1003 DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken( |
1004 server)); | 1004 server)); |
1005 } | 1005 } |
1006 | 1006 |
1007 } // namespace net | 1007 } // namespace net |
OLD | NEW |