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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 return ERR_UNEXPECTED; | 94 return ERR_UNEXPECTED; |
95 } | 95 } |
96 UploadProgress GetUploadProgress() const override { return UploadProgress(); } | 96 UploadProgress GetUploadProgress() const override { return UploadProgress(); } |
97 int ReadResponseHeaders(const CompletionCallback& callback) override { | 97 int ReadResponseHeaders(const CompletionCallback& callback) override { |
98 return ERR_UNEXPECTED; | 98 return ERR_UNEXPECTED; |
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 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 | 108 |
109 // Mocked API | 109 // Mocked API |
110 int ReadResponseBody(IOBuffer* buf, | 110 int ReadResponseBody(IOBuffer* buf, |
111 int buf_len, | 111 int buf_len, |
112 const CompletionCallback& callback) override; | 112 const CompletionCallback& callback) override; |
113 void Close(bool not_reusable) override { | 113 void Close(bool not_reusable) override { |
114 CHECK(!closed_); | 114 CHECK(!closed_); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 too_many_chunks += 1; // Now it's too large. | 302 too_many_chunks += 1; // Now it's too large. |
303 | 303 |
304 mock_stream_->set_num_chunks(too_many_chunks); | 304 mock_stream_->set_num_chunks(too_many_chunks); |
305 drainer_->Start(session_.get()); | 305 drainer_->Start(session_.get()); |
306 EXPECT_TRUE(result_waiter_.WaitForResult()); | 306 EXPECT_TRUE(result_waiter_.WaitForResult()); |
307 } | 307 } |
308 | 308 |
309 } // namespace | 309 } // namespace |
310 | 310 |
311 } // namespace net | 311 } // namespace net |
OLD | NEW |