| 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 #ifndef NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ | 5 #ifndef NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ |
| 6 #define NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ | 6 #define NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "net/tools/flip_server/buffer_interface.h" | 10 #include "net/tools/balsa/buffer_interface.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 // The ring buffer is a circular buffer, that is, reads or writes may wrap | 14 // The ring buffer is a circular buffer, that is, reads or writes may wrap |
| 15 // around the end of the linear memory contained by the class (and back to | 15 // around the end of the linear memory contained by the class (and back to |
| 16 // the beginning). This is a good choice when you want to use a fixed amount | 16 // the beginning). This is a good choice when you want to use a fixed amount |
| 17 // of buffering and don't want to be moving memory around a lot. | 17 // of buffering and don't want to be moving memory around a lot. |
| 18 // | 18 // |
| 19 // What is the penalty for using this over a normal, linear buffer? | 19 // What is the penalty for using this over a normal, linear buffer? |
| 20 // Reading all the data may take two operations, and | 20 // Reading all the data may take two operations, and |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 int write_idx_; | 104 int write_idx_; |
| 105 | 105 |
| 106 RingBuffer(const RingBuffer&); | 106 RingBuffer(const RingBuffer&); |
| 107 void operator=(const RingBuffer&); | 107 void operator=(const RingBuffer&); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace net | 110 } // namespace net |
| 111 | 111 |
| 112 #endif // NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ | 112 #endif // NET_TOOLS_FLIP_SERVER_RING_BUFFER_H__ |
| 113 | 113 |
| OLD | NEW |