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

Side by Side Diff: net/spdy/spdy_stream.cc

Issue 8230037: Send PING to check the status of the SPDY connection. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
« net/spdy/spdy_session.cc ('K') | « net/spdy/spdy_stream.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/spdy/spdy_session.h" 10 #include "net/spdy/spdy_session.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 send_time_ = base::TimeTicks::Now(); 397 send_time_ = base::TimeTicks::Now();
398 DCHECK(!has_upload_data_); 398 DCHECK(!has_upload_data_);
399 DCHECK(response_received()); 399 DCHECK(response_received());
400 return ERR_IO_PENDING; 400 return ERR_IO_PENDING;
401 } 401 }
402 CHECK_EQ(STATE_NONE, io_state_); 402 CHECK_EQ(STATE_NONE, io_state_);
403 io_state_ = STATE_SEND_HEADERS; 403 io_state_ = STATE_SEND_HEADERS;
404 return DoLoop(OK); 404 return DoLoop(OK);
405 } 405 }
406 406
407 int SpdyStream::SendPing() {
408 return session_->WritePingFrame(stream_id_);
409 }
410
407 int SpdyStream::WriteStreamData(IOBuffer* data, int length, 411 int SpdyStream::WriteStreamData(IOBuffer* data, int length,
408 spdy::SpdyDataFlags flags) { 412 spdy::SpdyDataFlags flags) {
409 return session_->WriteStreamData(stream_id_, data, length, flags); 413 return session_->WriteStreamData(stream_id_, data, length, flags);
410 } 414 }
411 415
412 bool SpdyStream::GetSSLInfo(SSLInfo* ssl_info, bool* was_npn_negotiated) { 416 bool SpdyStream::GetSSLInfo(SSLInfo* ssl_info, bool* was_npn_negotiated) {
413 return session_->GetSSLInfo(ssl_info, was_npn_negotiated); 417 return session_->GetSSLInfo(ssl_info, was_npn_negotiated);
414 } 418 }
415 419
416 bool SpdyStream::GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) { 420 bool SpdyStream::GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", 602 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime",
599 recv_last_byte_time_ - recv_first_byte_time_); 603 recv_last_byte_time_ - recv_first_byte_time_);
600 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", 604 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime",
601 recv_last_byte_time_ - send_time_); 605 recv_last_byte_time_ - send_time_);
602 606
603 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); 607 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_);
604 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); 608 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_);
605 } 609 }
606 610
607 } // namespace net 611 } // namespace net
OLDNEW
« net/spdy/spdy_session.cc ('K') | « net/spdy/spdy_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698