| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 CHECK(!not_expect_callback_); | 138 CHECK(!not_expect_callback_); |
| 139 CHECK_EQ(OK, error_); | 139 CHECK_EQ(OK, error_); |
| 140 CHECK_NE(OK, error); | 140 CHECK_NE(OK, error); |
| 141 | 141 |
| 142 on_failed_called_ = true; | 142 on_failed_called_ = true; |
| 143 error_ = error; | 143 error_ = error; |
| 144 loop_->Quit(); | 144 loop_->Quit(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void Start(const BidirectionalStreamRequestInfo* request_info, | 147 void Start(const BidirectionalStreamRequestInfo* request_info, |
| 148 const BoundNetLog& net_log, | 148 const NetLogWithSource& net_log, |
| 149 const base::WeakPtr<QuicChromiumClientSession> session) { | 149 const base::WeakPtr<QuicChromiumClientSession> session) { |
| 150 stream_.reset(new BidirectionalStreamQuicImpl(session)); | 150 stream_.reset(new BidirectionalStreamQuicImpl(session)); |
| 151 stream_->Start(request_info, net_log, send_request_headers_automatically_, | 151 stream_->Start(request_info, net_log, send_request_headers_automatically_, |
| 152 this, nullptr); | 152 this, nullptr); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void SendRequestHeaders() { stream_->SendRequestHeaders(); } | 155 void SendRequestHeaders() { stream_->SendRequestHeaders(); } |
| 156 | 156 |
| 157 void SendData(const scoped_refptr<IOBuffer>& data, | 157 void SendData(const scoped_refptr<IOBuffer>& data, |
| 158 int length, | 158 int length, |
| (...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 | 1757 |
| 1758 base::RunLoop().RunUntilIdle(); | 1758 base::RunLoop().RunUntilIdle(); |
| 1759 | 1759 |
| 1760 EXPECT_EQ(1, delegate->on_data_read_count()); | 1760 EXPECT_EQ(1, delegate->on_data_read_count()); |
| 1761 EXPECT_EQ(0, delegate->on_data_sent_count()); | 1761 EXPECT_EQ(0, delegate->on_data_sent_count()); |
| 1762 } | 1762 } |
| 1763 | 1763 |
| 1764 } // namespace test | 1764 } // namespace test |
| 1765 | 1765 |
| 1766 } // namespace net | 1766 } // namespace net |
| OLD | NEW |