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

Side by Side Diff: net/quic/quic_client_session.cc

Issue 944883003: QUIC - Cache the connection type and connection description. Make the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed const char* const as return value to fix ios_rel_device_ninja_ng compile error Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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_client_session.h" 5 #include "net/quic/quic_client_session.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ResetAndReturn(&callback_).Run(rv); 152 ResetAndReturn(&callback_).Run(rv);
153 } 153 }
154 154
155 QuicClientSession::QuicClientSession( 155 QuicClientSession::QuicClientSession(
156 QuicConnection* connection, 156 QuicConnection* connection,
157 scoped_ptr<DatagramClientSocket> socket, 157 scoped_ptr<DatagramClientSocket> socket,
158 QuicStreamFactory* stream_factory, 158 QuicStreamFactory* stream_factory,
159 TransportSecurityState* transport_security_state, 159 TransportSecurityState* transport_security_state,
160 scoped_ptr<QuicServerInfo> server_info, 160 scoped_ptr<QuicServerInfo> server_info,
161 const QuicConfig& config, 161 const QuicConfig& config,
162 const char* const connection_description,
162 base::TaskRunner* task_runner, 163 base::TaskRunner* task_runner,
163 NetLog* net_log) 164 NetLog* net_log)
164 : QuicClientSessionBase(connection, config), 165 : QuicClientSessionBase(connection, config),
165 require_confirmation_(false), 166 require_confirmation_(false),
166 stream_factory_(stream_factory), 167 stream_factory_(stream_factory),
167 socket_(socket.Pass()), 168 socket_(socket.Pass()),
168 read_buffer_(new IOBufferWithSize(kMaxPacketSize)), 169 read_buffer_(new IOBufferWithSize(kMaxPacketSize)),
169 transport_security_state_(transport_security_state), 170 transport_security_state_(transport_security_state),
170 server_info_(server_info.Pass()), 171 server_info_(server_info.Pass()),
171 read_pending_(false), 172 read_pending_(false),
172 num_total_streams_(0), 173 num_total_streams_(0),
173 task_runner_(task_runner), 174 task_runner_(task_runner),
174 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)), 175 net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_QUIC_SESSION)),
175 logger_(new QuicConnectionLogger(this, net_log_)), 176 logger_(new QuicConnectionLogger(this, connection_description, net_log_)),
176 num_packets_read_(0), 177 num_packets_read_(0),
177 going_away_(false), 178 going_away_(false),
178 weak_factory_(this) { 179 weak_factory_(this) {
179 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 180 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
180 tracked_objects::ScopedTracker tracking_profile1( 181 tracked_objects::ScopedTracker tracking_profile1(
181 FROM_HERE_WITH_EXPLICIT_FUNCTION( 182 FROM_HERE_WITH_EXPLICIT_FUNCTION(
182 "422516 QuicClientSession::QuicClientSession1")); 183 "422516 QuicClientSession::QuicClientSession1"));
183 184
184 connection->set_debug_visitor(logger_); 185 connection->set_debug_visitor(logger_);
185 IPEndPoint address; 186 IPEndPoint address;
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 return; 947 return;
947 948
948 // TODO(rch): re-enable this code once beta is cut. 949 // TODO(rch): re-enable this code once beta is cut.
949 // if (stream_factory_) 950 // if (stream_factory_)
950 // stream_factory_->OnSessionConnectTimeout(this); 951 // stream_factory_->OnSessionConnectTimeout(this);
951 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); 952 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED);
952 // DCHECK_EQ(0u, GetNumOpenStreams()); 953 // DCHECK_EQ(0u, GetNumOpenStreams());
953 } 954 }
954 955
955 } // namespace net 956 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698