Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: net/quic/quic_stream_factory.cc

Issue 1305293004: Notfiy NQE of QUIC RTT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed a test Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 2f75005407c6227bcb5198d6e801faef90822e9e..102903ec2449dc664b90ce798ea9dc461bd37e6a 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -19,6 +19,8 @@
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
#include "net/base/net_errors.h"
+#include "net/base/socket_performance_watcher.h"
+#include "net/base/socket_performance_watcher_factory.h"
#include "net/cert/cert_verifier.h"
#include "net/dns/host_resolver.h"
#include "net/dns/single_request_host_resolver.h"
@@ -570,6 +572,7 @@ QuicStreamFactory::QuicStreamFactory(
CertPolicyEnforcer* cert_policy_enforcer,
ChannelIDService* channel_id_service,
TransportSecurityState* transport_security_state,
+ const SocketPerformanceWatcherFactory* socket_performance_watcher_factory,
QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
QuicRandom* random_generator,
QuicClock* clock,
@@ -602,6 +605,7 @@ QuicStreamFactory::QuicStreamFactory(
random_generator_(random_generator),
clock_(clock),
max_packet_length_(max_packet_length),
+ socket_performance_watcher_factory_(socket_performance_watcher_factory),
config_(InitializeQuicConfig(connection_options)),
supported_versions_(supported_versions),
enable_port_selection_(enable_port_selection),
@@ -1283,12 +1287,21 @@ int QuicStreamFactory::CreateSession(const QuicServerId& server_id,
server_info->Start();
}
+ // Use the factory to create a new socket performance watcher, and pass the
+ // ownership to QuicChromiumClientSession.
+ scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher;
+ if (socket_performance_watcher_factory_) {
+ socket_performance_watcher = socket_performance_watcher_factory_
+ ->CreateUDPSocketPerformanceWatcher();
+ }
+
*session = new QuicChromiumClientSession(
connection, socket.Pass(), this, quic_crypto_client_stream_factory_,
transport_security_state_, server_info.Pass(), server_id,
cert_verify_flags, config, &crypto_config_,
network_connection_.GetDescription(), dns_resolution_end_time,
- base::ThreadTaskRunnerHandle::Get().get(), net_log.net_log());
+ base::ThreadTaskRunnerHandle::Get().get(),
+ socket_performance_watcher.Pass(), net_log.net_log());
all_sessions_[*session] = server_id; // owning pointer
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698