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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/ssl/openssl_ssl_util.cc » ('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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/profiler/scoped_tracker.h"
11 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "net/spdy/spdy_buffer_producer.h" 15 #include "net/spdy/spdy_buffer_producer.h"
15 #include "net/spdy/spdy_http_utils.h" 16 #include "net/spdy/spdy_http_utils.h"
16 #include "net/spdy/spdy_session.h" 17 #include "net/spdy/spdy_session.h"
17 18
18 namespace net { 19 namespace net {
19 20
20 namespace { 21 namespace {
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 metrics_.RecordBytes(length); 522 metrics_.RecordBytes(length);
522 recv_bytes_ += length; 523 recv_bytes_ += length;
523 recv_last_byte_time_ = base::TimeTicks::Now(); 524 recv_last_byte_time_ = base::TimeTicks::Now();
524 525
525 // May close |this|. 526 // May close |this|.
526 delegate_->OnDataReceived(buffer.Pass()); 527 delegate_->OnDataReceived(buffer.Pass());
527 } 528 }
528 529
529 void SpdyStream::OnFrameWriteComplete(SpdyFrameType frame_type, 530 void SpdyStream::OnFrameWriteComplete(SpdyFrameType frame_type,
530 size_t frame_size) { 531 size_t frame_size) {
532 // TODO(pkasting): Remove ScopedTracker below once crbug.com/457517 is fixed.
533 tracked_objects::ScopedTracker tracking_profile(
534 FROM_HERE_WITH_EXPLICIT_FUNCTION(
535 "457517 SpdyStream::OnFrameWriteComplete"));
531 DCHECK_NE(type_, SPDY_PUSH_STREAM); 536 DCHECK_NE(type_, SPDY_PUSH_STREAM);
532 537
533 if (frame_size < session_->GetFrameMinimumSize() || 538 if (frame_size < session_->GetFrameMinimumSize() ||
534 frame_size > session_->GetFrameMaximumSize()) { 539 frame_size > session_->GetFrameMaximumSize()) {
535 NOTREACHED(); 540 NOTREACHED();
536 return; 541 return;
537 } 542 }
538 CHECK(frame_type == SYN_STREAM || 543 CHECK(frame_type == SYN_STREAM ||
539 frame_type == DATA) << frame_type; 544 frame_type == DATA) << frame_type;
540 545
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 918 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
914 state); 919 state);
915 break; 920 break;
916 } 921 }
917 return description; 922 return description;
918 } 923 }
919 924
920 #undef STATE_CASE 925 #undef STATE_CASE
921 926
922 } // namespace net 927 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool.cc ('k') | net/ssl/openssl_ssl_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698