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/http/http_response_body_drainer.h" | 5 #include "net/http/http_response_body_drainer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstring> | 9 #include <cstring> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 | 100 |
101 bool IsConnectionReused() const override { return false; } | 101 bool IsConnectionReused() const override { return false; } |
102 void SetConnectionReused() override {} | 102 void SetConnectionReused() override {} |
103 bool CanReuseConnection() const override { return false; } | 103 bool CanReuseConnection() const override { return false; } |
104 int64_t GetTotalReceivedBytes() const override { return 0; } | 104 int64_t GetTotalReceivedBytes() const override { return 0; } |
105 int64_t GetTotalSentBytes() const override { return 0; } | 105 int64_t GetTotalSentBytes() const override { return 0; } |
106 void GetSSLInfo(SSLInfo* ssl_info) override {} | 106 void GetSSLInfo(SSLInfo* ssl_info) override {} |
107 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} | 107 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} |
108 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } | 108 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } |
| 109 int GetTokenBindingMessageHeader(std::string* out) override { |
| 110 return ERR_NOT_IMPLEMENTED; |
| 111 } |
109 | 112 |
110 // Mocked API | 113 // Mocked API |
111 int ReadResponseBody(IOBuffer* buf, | 114 int ReadResponseBody(IOBuffer* buf, |
112 int buf_len, | 115 int buf_len, |
113 const CompletionCallback& callback) override; | 116 const CompletionCallback& callback) override; |
114 void Close(bool not_reusable) override { | 117 void Close(bool not_reusable) override { |
115 CHECK(!closed_); | 118 CHECK(!closed_); |
116 closed_ = true; | 119 closed_ = true; |
117 result_waiter_->set_result(not_reusable); | 120 result_waiter_->set_result(not_reusable); |
118 } | 121 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 too_many_chunks += 1; // Now it's too large. | 306 too_many_chunks += 1; // Now it's too large. |
304 | 307 |
305 mock_stream_->set_num_chunks(too_many_chunks); | 308 mock_stream_->set_num_chunks(too_many_chunks); |
306 drainer_->Start(session_.get()); | 309 drainer_->Start(session_.get()); |
307 EXPECT_TRUE(result_waiter_.WaitForResult()); | 310 EXPECT_TRUE(result_waiter_.WaitForResult()); |
308 } | 311 } |
309 | 312 |
310 } // namespace | 313 } // namespace |
311 | 314 |
312 } // namespace net | 315 } // namespace net |
OLD | NEW |