Chromium Code Reviews| Index: net/quic/quic_stream_factory.cc |
| diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc |
| index efa9fcab1f92e2b4a8d14ee80c633a6e0cccf3ab..d172885bec616d00189120a6c887ed35f856e356 100644 |
| --- a/net/quic/quic_stream_factory.cc |
| +++ b/net/quic/quic_stream_factory.cc |
| @@ -511,9 +511,14 @@ int QuicStreamFactory::CreateSession( |
| IPEndPoint addr = *address_list.begin(); |
| scoped_refptr<PortSuggester> port_suggester = |
| new PortSuggester(host_port_proxy_pair.first, port_seed_); |
| + DatagramSocket::BindType bind_type = DatagramSocket::RANDOM_BIND; |
| +#if defined(OS_WIN) |
| + // TODO(jar)bug=329255 Provide better implementation to avoid pop-up warning. |
| + bind_type = DatagramSocket::DEFAULT_BIND; |
|
Ryan Hamilton
2014/01/08 22:21:52
nit: i wonder if it would more symmetrical to do:
|
| +#endif |
| scoped_ptr<DatagramClientSocket> socket( |
| client_socket_factory_->CreateDatagramClientSocket( |
| - DatagramSocket::RANDOM_BIND, |
| + bind_type, |
| base::Bind(&PortSuggester::SuggestPort, port_suggester), |
| net_log.net_log(), net_log.source())); |
| int rv = socket->Connect(addr); |
| @@ -521,7 +526,12 @@ int QuicStreamFactory::CreateSession( |
| return rv; |
| UMA_HISTOGRAM_COUNTS("Net.QuicEphemeralPortsSuggested", |
| port_suggester->call_count()); |
| +#if defined(OS_WIN) |
| + // TODO(jar)bug=329255 Provide better implementation to avoid pop-up warning. |
| + DCHECK_EQ(0u, port_suggester->call_count()); |
| +#else |
| DCHECK_LE(1u, port_suggester->call_count()); |
| +#endif |
|
wtc
2014/01/08 22:36:05
I would just do
// TODO(jar)bug=329255 Provide be
|
| // We should adaptively set this buffer size, but for now, we'll use a size |
| // that is more than large enough for a full receive window, and yet |