OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/test_data_stream.h" | 5 #include "net/base/test_data_stream.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 TestDataStream::TestDataStream() { | 9 TestDataStream::TestDataStream() { |
10 Reset(); | 10 Reset(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Consume data from the spill buffer. | 58 // Consume data from the spill buffer. |
59 void TestDataStream::Consume(int bytes) { | 59 void TestDataStream::Consume(int bytes) { |
60 bytes_remaining_ -= bytes; | 60 bytes_remaining_ -= bytes; |
61 if (bytes_remaining_) | 61 if (bytes_remaining_) |
62 buffer_ptr_ += bytes; | 62 buffer_ptr_ += bytes; |
63 else | 63 else |
64 buffer_ptr_ = buffer_; | 64 buffer_ptr_ = buffer_; |
65 } | 65 } |
66 | 66 |
67 } // namespace net | 67 } // namespace net |
68 | |
OLD | NEW |