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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 104 } |
105 | 105 |
106 bool IsConnectionReused() const override { return false; } | 106 bool IsConnectionReused() const override { return false; } |
107 void SetConnectionReused() override {} | 107 void SetConnectionReused() override {} |
108 bool CanReuseConnection() const override { return can_reuse_connection_; } | 108 bool CanReuseConnection() const override { return can_reuse_connection_; } |
109 int64_t GetTotalReceivedBytes() const override { return 0; } | 109 int64_t GetTotalReceivedBytes() const override { return 0; } |
110 int64_t GetTotalSentBytes() const override { return 0; } | 110 int64_t GetTotalSentBytes() const override { return 0; } |
111 void GetSSLInfo(SSLInfo* ssl_info) override {} | 111 void GetSSLInfo(SSLInfo* ssl_info) override {} |
112 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} | 112 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {} |
113 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } | 113 bool GetRemoteEndpoint(IPEndPoint* endpoint) override { return false; } |
114 Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key, | 114 Error GetTokenBindingSignature(crypto::ECPrivateKey* key, |
115 std::vector<uint8_t>* out) override { | 115 TokenBindingType tb_type, |
| 116 std::vector<uint8_t>* out) override { |
116 ADD_FAILURE(); | 117 ADD_FAILURE(); |
117 return ERR_NOT_IMPLEMENTED; | 118 return ERR_NOT_IMPLEMENTED; |
118 } | 119 } |
119 | 120 |
120 // Mocked API | 121 // Mocked API |
121 int ReadResponseBody(IOBuffer* buf, | 122 int ReadResponseBody(IOBuffer* buf, |
122 int buf_len, | 123 int buf_len, |
123 const CompletionCallback& callback) override; | 124 const CompletionCallback& callback) override; |
124 void Close(bool not_reusable) override { | 125 void Close(bool not_reusable) override { |
125 CHECK(!closed_); | 126 CHECK(!closed_); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { | 337 TEST_F(HttpResponseBodyDrainerTest, DrainBodyCantReuse) { |
337 mock_stream_->set_num_chunks(1); | 338 mock_stream_->set_num_chunks(1); |
338 mock_stream_->set_can_reuse_connection(false); | 339 mock_stream_->set_can_reuse_connection(false); |
339 drainer_->Start(session_.get()); | 340 drainer_->Start(session_.get()); |
340 EXPECT_TRUE(result_waiter_.WaitForResult()); | 341 EXPECT_TRUE(result_waiter_.WaitForResult()); |
341 } | 342 } |
342 | 343 |
343 } // namespace | 344 } // namespace |
344 | 345 |
345 } // namespace net | 346 } // namespace net |
OLD | NEW |