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 GetProvidedTokenBindingWithKey( |
| 110 const scoped_ptr<crypto::ECPrivateKey>& key, |
| 111 std::string* header_out) override { |
| 112 ADD_FAILURE(); |
| 113 return ERR_NOT_IMPLEMENTED; |
| 114 } |
109 | 115 |
110 // Mocked API | 116 // Mocked API |
111 int ReadResponseBody(IOBuffer* buf, | 117 int ReadResponseBody(IOBuffer* buf, |
112 int buf_len, | 118 int buf_len, |
113 const CompletionCallback& callback) override; | 119 const CompletionCallback& callback) override; |
114 void Close(bool not_reusable) override { | 120 void Close(bool not_reusable) override { |
115 CHECK(!closed_); | 121 CHECK(!closed_); |
116 closed_ = true; | 122 closed_ = true; |
117 result_waiter_->set_result(not_reusable); | 123 result_waiter_->set_result(not_reusable); |
118 } | 124 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 too_many_chunks += 1; // Now it's too large. | 309 too_many_chunks += 1; // Now it's too large. |
304 | 310 |
305 mock_stream_->set_num_chunks(too_many_chunks); | 311 mock_stream_->set_num_chunks(too_many_chunks); |
306 drainer_->Start(session_.get()); | 312 drainer_->Start(session_.get()); |
307 EXPECT_TRUE(result_waiter_.WaitForResult()); | 313 EXPECT_TRUE(result_waiter_.WaitForResult()); |
308 } | 314 } |
309 | 315 |
310 } // namespace | 316 } // namespace |
311 | 317 |
312 } // namespace net | 318 } // namespace net |
OLD | NEW |