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 <cstring> | 7 #include <cstring> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const BoundNetLog& net_log, | 78 const BoundNetLog& net_log, |
79 const CompletionCallback& callback) OVERRIDE { | 79 const CompletionCallback& callback) OVERRIDE { |
80 return ERR_UNEXPECTED; | 80 return ERR_UNEXPECTED; |
81 } | 81 } |
82 virtual int SendRequest(const HttpRequestHeaders& request_headers, | 82 virtual int SendRequest(const HttpRequestHeaders& request_headers, |
83 scoped_ptr<UploadDataStream> request_body, | 83 scoped_ptr<UploadDataStream> request_body, |
84 HttpResponseInfo* response, | 84 HttpResponseInfo* response, |
85 const CompletionCallback& callback) OVERRIDE { | 85 const CompletionCallback& callback) OVERRIDE { |
86 return ERR_UNEXPECTED; | 86 return ERR_UNEXPECTED; |
87 } | 87 } |
88 virtual uint64 GetUploadProgress() const OVERRIDE { return 0; } | 88 virtual UploadProgress GetUploadProgress() const OVERRIDE { |
| 89 return UploadProgress(); |
| 90 } |
89 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE { | 91 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE { |
90 return ERR_UNEXPECTED; | 92 return ERR_UNEXPECTED; |
91 } | 93 } |
92 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE { | 94 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE { |
93 return NULL; | 95 return NULL; |
94 } | 96 } |
95 | 97 |
96 virtual bool CanFindEndOfResponse() const OVERRIDE { return true; } | 98 virtual bool CanFindEndOfResponse() const OVERRIDE { return true; } |
97 virtual bool IsMoreDataBuffered() const OVERRIDE { return false; } | 99 virtual bool IsMoreDataBuffered() const OVERRIDE { return false; } |
98 virtual bool IsConnectionReused() const OVERRIDE { return false; } | 100 virtual bool IsConnectionReused() const OVERRIDE { return false; } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 268 |
267 TEST_F(HttpResponseBodyDrainerTest, StartWithNothingToDo) { | 269 TEST_F(HttpResponseBodyDrainerTest, StartWithNothingToDo) { |
268 mock_stream_->set_num_chunks(0); | 270 mock_stream_->set_num_chunks(0); |
269 drainer_->StartWithSize(session_, 0); | 271 drainer_->StartWithSize(session_, 0); |
270 EXPECT_FALSE(result_waiter_.WaitForResult()); | 272 EXPECT_FALSE(result_waiter_.WaitForResult()); |
271 } | 273 } |
272 | 274 |
273 } // namespace | 275 } // namespace |
274 | 276 |
275 } // namespace net | 277 } // namespace net |
OLD | NEW |