Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: net/tools/flip_server/ring_buffer.h

Issue 93793004: Format and Refactor Flip Server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/flip_server/output_ordering.cc ('k') | net/tools/flip_server/ring_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/balsa/buffer_interface.h" 10 #include "net/tools/balsa/buffer_interface.h"
(...skipping 29 matching lines...) Expand all
40 // of what they do if the function isn't documented here. 40 // of what they do if the function isn't documented here.
41 virtual int ReadableBytes() const OVERRIDE; 41 virtual int ReadableBytes() const OVERRIDE;
42 virtual int BufferSize() const OVERRIDE; 42 virtual int BufferSize() const OVERRIDE;
43 virtual int BytesFree() const OVERRIDE; 43 virtual int BytesFree() const OVERRIDE;
44 44
45 virtual bool Empty() const OVERRIDE; 45 virtual bool Empty() const OVERRIDE;
46 virtual bool Full() const OVERRIDE; 46 virtual bool Full() const OVERRIDE;
47 47
48 // returns the number of characters written. 48 // returns the number of characters written.
49 // appends up-to-'size' bytes to the ringbuffer. 49 // appends up-to-'size' bytes to the ringbuffer.
50 virtual int Write(const char * bytes, int size) OVERRIDE; 50 virtual int Write(const char* bytes, int size) OVERRIDE;
51 51
52 // Stores a pointer into the ring buffer in *ptr, and stores the number of 52 // Stores a pointer into the ring buffer in *ptr, and stores the number of
53 // characters which are allowed to be written in *size. 53 // characters which are allowed to be written in *size.
54 // If there are no writable bytes available, then *size will contain 0. 54 // If there are no writable bytes available, then *size will contain 0.
55 virtual void GetWritablePtr(char** ptr, int* size) const OVERRIDE; 55 virtual void GetWritablePtr(char** ptr, int* size) const OVERRIDE;
56 56
57 // Stores a pointer into the ring buffer in *ptr, and stores the number of 57 // Stores a pointer into the ring buffer in *ptr, and stores the number of
58 // characters which are allowed to be read in *size. 58 // characters which are allowed to be read in *size.
59 // If there are no readable bytes available, then *size will contain 0. 59 // If there are no readable bytes available, then *size will contain 0.
60 virtual void GetReadablePtr(char** ptr, int* size) const OVERRIDE; 60 virtual void GetReadablePtr(char** ptr, int* size) const OVERRIDE;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 int read_idx_; 103 int read_idx_;
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
OLDNEW
« no previous file with comments | « net/tools/flip_server/output_ordering.cc ('k') | net/tools/flip_server/ring_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698