| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromium/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 CHECK(!not_expect_callback_); | 134 CHECK(!not_expect_callback_); |
| 135 CHECK_EQ(OK, error_); | 135 CHECK_EQ(OK, error_); |
| 136 CHECK_NE(OK, error); | 136 CHECK_NE(OK, error); |
| 137 | 137 |
| 138 on_failed_called_ = true; | 138 on_failed_called_ = true; |
| 139 error_ = error; | 139 error_ = error; |
| 140 loop_->Quit(); | 140 loop_->Quit(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void Start(const BidirectionalStreamRequestInfo* request_info, | 143 void Start(const BidirectionalStreamRequestInfo* request_info, |
| 144 const BoundNetLog& net_log, | 144 const NetLogWithSource& net_log, |
| 145 const base::WeakPtr<QuicChromiumClientSession> session) { | 145 const base::WeakPtr<QuicChromiumClientSession> session) { |
| 146 stream_.reset(new BidirectionalStreamQuicImpl(session)); | 146 stream_.reset(new BidirectionalStreamQuicImpl(session)); |
| 147 stream_->Start(request_info, net_log, send_request_headers_automatically_, | 147 stream_->Start(request_info, net_log, send_request_headers_automatically_, |
| 148 this, nullptr); | 148 this, nullptr); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void SendRequestHeaders() { stream_->SendRequestHeaders(); } | 151 void SendRequestHeaders() { stream_->SendRequestHeaders(); } |
| 152 | 152 |
| 153 void SendData(const scoped_refptr<IOBuffer>& data, | 153 void SendData(const scoped_refptr<IOBuffer>& data, |
| 154 int length, | 154 int length, |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 | 1629 |
| 1630 base::RunLoop().RunUntilIdle(); | 1630 base::RunLoop().RunUntilIdle(); |
| 1631 | 1631 |
| 1632 EXPECT_EQ(1, delegate->on_data_read_count()); | 1632 EXPECT_EQ(1, delegate->on_data_read_count()); |
| 1633 EXPECT_EQ(0, delegate->on_data_sent_count()); | 1633 EXPECT_EQ(0, delegate->on_data_sent_count()); |
| 1634 } | 1634 } |
| 1635 | 1635 |
| 1636 } // namespace test | 1636 } // namespace test |
| 1637 | 1637 |
| 1638 } // namespace net | 1638 } // namespace net |
| OLD | NEW |