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

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

Issue 23597045: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged QuicPriority to RequestPriority changes Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_client_session.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.QuicVersion", 308 UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.QuicVersion",
309 connection()->version()); 309 connection()->version());
310 if (!callback_.is_null()) { 310 if (!callback_.is_null()) {
311 base::ResetAndReturn(&callback_).Run(ERR_QUIC_PROTOCOL_ERROR); 311 base::ResetAndReturn(&callback_).Run(ERR_QUIC_PROTOCOL_ERROR);
312 } 312 }
313 QuicSession::ConnectionClose(error, from_peer); 313 QuicSession::ConnectionClose(error, from_peer);
314 NotifyFactoryOfSessionCloseLater(); 314 NotifyFactoryOfSessionCloseLater();
315 } 315 }
316 316
317 void QuicClientSession::OnSuccessfulVersionNegotiation(
318 const QuicVersion& version) {
319 logger_.OnSuccessfulVersionNegotiation(version);
320 QuicSession::OnSuccessfulVersionNegotiation(version);
321 }
322
317 void QuicClientSession::StartReading() { 323 void QuicClientSession::StartReading() {
318 if (read_pending_) { 324 if (read_pending_) {
319 return; 325 return;
320 } 326 }
321 read_pending_ = true; 327 read_pending_ = true;
322 int rv = socket_->Read(read_buffer_.get(), 328 int rv = socket_->Read(read_buffer_.get(),
323 read_buffer_->size(), 329 read_buffer_->size(),
324 base::Bind(&QuicClientSession::OnReadComplete, 330 base::Bind(&QuicClientSession::OnReadComplete,
325 weak_factory_.GetWeakPtr())); 331 weak_factory_.GetWeakPtr()));
326 if (rv == ERR_IO_PENDING) { 332 if (rv == ERR_IO_PENDING) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 422 }
417 423
418 void QuicClientSession::NotifyFactoryOfSessionClose() { 424 void QuicClientSession::NotifyFactoryOfSessionClose() {
419 DCHECK_EQ(0u, GetNumOpenStreams()); 425 DCHECK_EQ(0u, GetNumOpenStreams());
420 DCHECK(stream_factory_); 426 DCHECK(stream_factory_);
421 // Will delete |this|. 427 // Will delete |this|.
422 stream_factory_->OnSessionClose(this); 428 stream_factory_->OnSessionClose(this);
423 } 429 }
424 430
425 } // namespace net 431 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698