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

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

Issue 2987002: Removed incorrect dcheck. (Closed)
Patch Set: Created 10 years, 5 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
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/singleton.h" 9 #include "base/singleton.h"
10 #include "net/spdy/spdy_session.h" 10 #include "net/spdy/spdy_session.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 int SpdyStream::OnResponseReceived(const spdy::SpdyHeaderBlock& response) { 82 int SpdyStream::OnResponseReceived(const spdy::SpdyHeaderBlock& response) {
83 int rv = OK; 83 int rv = OK;
84 LOG(INFO) << "OnResponseReceived"; 84 LOG(INFO) << "OnResponseReceived";
85 85
86 metrics_.StartStream(); 86 metrics_.StartStream();
87 87
88 DCHECK(response_->empty()); 88 DCHECK(response_->empty());
89 *response_ = response; // TODO(ukai): avoid copy. 89 *response_ = response; // TODO(ukai): avoid copy.
90 DCHECK(!response_->empty());
91 90
92 recv_first_byte_time_ = base::TimeTicks::Now(); 91 recv_first_byte_time_ = base::TimeTicks::Now();
93 response_time_ = base::Time::Now(); 92 response_time_ = base::Time::Now();
94 93
95 if (io_state_ == STATE_NONE) { 94 if (io_state_ == STATE_NONE) {
96 CHECK(pushed_); 95 CHECK(pushed_);
97 io_state_ = STATE_READ_HEADERS; 96 io_state_ = STATE_READ_HEADERS;
98 } else if (io_state_ == STATE_READ_HEADERS_COMPLETE) { 97 } else if (io_state_ == STATE_READ_HEADERS_COMPLETE) {
99 // This SpdyStream could be in this state in both true and false pushed_ 98 // This SpdyStream could be in this state in both true and false pushed_
100 // conditions. 99 // conditions.
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", 398 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime",
400 recv_last_byte_time_ - recv_first_byte_time_); 399 recv_last_byte_time_ - recv_first_byte_time_);
401 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", 400 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime",
402 recv_last_byte_time_ - send_time_); 401 recv_last_byte_time_ - send_time_);
403 402
404 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); 403 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_);
405 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); 404 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_);
406 } 405 }
407 406
408 } // namespace net 407 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698