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

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

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/flip_server/acceptor_thread.h ('k') | net/tools/flip_server/simple_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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_SIMPLE_BUFFER_H__ 5 #ifndef NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
6 #define NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__ 6 #define NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "net/tools/flip_server/buffer_interface.h" 11 #include "net/tools/flip_server/buffer_interface.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 class SimpleBuffer : public BufferInterface { 15 class SimpleBuffer : public BufferInterface {
16 public: 16 public:
17 SimpleBuffer(); 17 SimpleBuffer();
18 explicit SimpleBuffer(int size); 18 explicit SimpleBuffer(int size);
19 virtual ~SimpleBuffer() { 19 virtual ~SimpleBuffer();
20 delete[] storage_;
21 }
22 20
23 std::string str() const; 21 std::string str() const;
24 22
25 typedef char * iterator; 23 typedef char * iterator;
26 typedef const char * const_iterator; 24 typedef const char * const_iterator;
27 25
28 iterator begin() { return storage_ + read_idx_; } 26 iterator begin() { return storage_ + read_idx_; }
29 const_iterator begin() const { return storage_ + read_idx_; } 27 const_iterator begin() const { return storage_ + read_idx_; }
30 28
31 iterator end() { return storage_ + write_idx_; } 29 iterator end() { return storage_ + write_idx_; }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int read_idx_; 83 int read_idx_;
86 int storage_size_; 84 int storage_size_;
87 85
88 private: 86 private:
89 //DISALLOW_COPY_AND_ASSIGN(SimpleBuffer); 87 //DISALLOW_COPY_AND_ASSIGN(SimpleBuffer);
90 }; 88 };
91 89
92 } // namespace net 90 } // namespace net
93 91
94 #endif // NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__ 92 #endif // NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
95
OLDNEW
« no previous file with comments | « net/tools/flip_server/acceptor_thread.h ('k') | net/tools/flip_server/simple_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698