OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_transaction_test_util.h" | 5 #include "net/http/http_transaction_test_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void MockNetworkTransaction::StopCaching() { | 318 void MockNetworkTransaction::StopCaching() { |
319 if (transaction_factory_.get()) | 319 if (transaction_factory_.get()) |
320 transaction_factory_->TransactionStopCaching(); | 320 transaction_factory_->TransactionStopCaching(); |
321 } | 321 } |
322 | 322 |
323 bool MockNetworkTransaction::GetFullRequestHeaders( | 323 bool MockNetworkTransaction::GetFullRequestHeaders( |
324 HttpRequestHeaders* headers) const { | 324 HttpRequestHeaders* headers) const { |
325 return false; | 325 return false; |
326 } | 326 } |
327 | 327 |
328 int64 MockNetworkTransaction::GetTotalReceivedBytes() const { | 328 int64_t MockNetworkTransaction::GetTotalReceivedBytes() const { |
329 return received_bytes_; | 329 return received_bytes_; |
330 } | 330 } |
331 | 331 |
332 int64_t MockNetworkTransaction::GetTotalSentBytes() const { | 332 int64_t MockNetworkTransaction::GetTotalSentBytes() const { |
333 return sent_bytes_; | 333 return sent_bytes_; |
334 } | 334 } |
335 | 335 |
336 void MockNetworkTransaction::DoneReading() { | 336 void MockNetworkTransaction::DoneReading() { |
337 if (transaction_factory_.get()) | 337 if (transaction_factory_.get()) |
338 transaction_factory_->TransactionDoneReading(); | 338 transaction_factory_->TransactionDoneReading(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 content.append(buf->data(), rv); | 551 content.append(buf->data(), rv); |
552 else if (rv < 0) | 552 else if (rv < 0) |
553 return rv; | 553 return rv; |
554 } while (rv > 0); | 554 } while (rv > 0); |
555 | 555 |
556 result->swap(content); | 556 result->swap(content); |
557 return OK; | 557 return OK; |
558 } | 558 } |
559 | 559 |
560 } // namespace net | 560 } // namespace net |
OLD | NEW |