OLD | NEW |
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_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #ifdef TEMP_INSTRUMENTATION_468529 | 8 #ifdef TEMP_INSTRUMENTATION_468529 |
9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
10 #endif | 10 #endif |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 response_info_->request_time = request_time_; | 530 response_info_->request_time = request_time_; |
531 response_headers_received_ = true; | 531 response_headers_received_ = true; |
532 | 532 |
533 return OK; | 533 return OK; |
534 } | 534 } |
535 | 535 |
536 int QuicHttpStream::ReadAvailableData(IOBuffer* buf, int buf_len) { | 536 int QuicHttpStream::ReadAvailableData(IOBuffer* buf, int buf_len) { |
537 int rv = stream_->Read(buf, buf_len); | 537 int rv = stream_->Read(buf, buf_len); |
538 if (stream_->IsDoneReading()) { | 538 if (stream_->IsDoneReading()) { |
539 stream_->SetDelegate(nullptr); | 539 stream_->SetDelegate(nullptr); |
540 stream_->DoneReading(); | 540 stream_->OnFinRead(); |
541 stream_ = nullptr; | 541 stream_ = nullptr; |
542 } | 542 } |
543 return rv; | 543 return rv; |
544 } | 544 } |
545 | 545 |
546 SpdyMajorVersion QuicHttpStream::GetSpdyVersion() { | 546 SpdyMajorVersion QuicHttpStream::GetSpdyVersion() { |
547 return SpdyUtils::GetSpdyVersionForQuicVersion(stream_->version()); | 547 return SpdyUtils::GetSpdyVersionForQuicVersion(stream_->version()); |
548 } | 548 } |
549 | 549 |
550 void QuicHttpStream::CrashIfInvalid() const { | 550 void QuicHttpStream::CrashIfInvalid() const { |
551 #ifdef TEMP_INSTRUMENTATION_468529 | 551 #ifdef TEMP_INSTRUMENTATION_468529 |
552 Liveness liveness = liveness_; | 552 Liveness liveness = liveness_; |
553 | 553 |
554 if (liveness == ALIVE) | 554 if (liveness == ALIVE) |
555 return; | 555 return; |
556 | 556 |
557 // Copy relevant variables onto the stack to guarantee they will be available | 557 // Copy relevant variables onto the stack to guarantee they will be available |
558 // in minidumps, and then crash. | 558 // in minidumps, and then crash. |
559 base::debug::StackTrace stack_trace = stack_trace_; | 559 base::debug::StackTrace stack_trace = stack_trace_; |
560 | 560 |
561 base::debug::Alias(&liveness); | 561 base::debug::Alias(&liveness); |
562 base::debug::Alias(&stack_trace); | 562 base::debug::Alias(&stack_trace); |
563 | 563 |
564 CHECK_EQ(ALIVE, liveness); | 564 CHECK_EQ(ALIVE, liveness); |
565 #endif | 565 #endif |
566 } | 566 } |
567 | 567 |
568 } // namespace net | 568 } // namespace net |
OLD | NEW |