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/socket_stream/socket_stream.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/socket/tcp_server_socket_libevent.h ('k') | net/tools/flip_server/acceptor_thread.h » ('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_SOCKET_STREAM_SOCKET_STREAM_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 public: 182 public:
183 RequestHeaders() : IOBuffer() {} 183 RequestHeaders() : IOBuffer() {}
184 184
185 void SetDataOffset(size_t offset) { 185 void SetDataOffset(size_t offset) {
186 data_ = const_cast<char*>(headers_.data()) + offset; 186 data_ = const_cast<char*>(headers_.data()) + offset;
187 } 187 }
188 188
189 std::string headers_; 189 std::string headers_;
190 190
191 private: 191 private:
192 ~RequestHeaders() { data_ = NULL; } 192 virtual ~RequestHeaders() { data_ = NULL; }
193 }; 193 };
194 194
195 class ResponseHeaders : public IOBuffer { 195 class ResponseHeaders : public IOBuffer {
196 public: 196 public:
197 ResponseHeaders(); 197 ResponseHeaders();
198 198
199 void SetDataOffset(size_t offset) { data_ = headers_.get() + offset; } 199 void SetDataOffset(size_t offset) { data_ = headers_.get() + offset; }
200 char* headers() const { return headers_.get(); } 200 char* headers() const { return headers_.get(); }
201 void Reset() { headers_.reset(); } 201 void Reset() { headers_.reset(); }
202 void Realloc(size_t new_size); 202 void Realloc(size_t new_size);
203 203
204 private: 204 private:
205 ~ResponseHeaders(); 205 virtual ~ResponseHeaders();
206 206
207 scoped_ptr_malloc<char> headers_; 207 scoped_ptr_malloc<char> headers_;
208 }; 208 };
209 209
210 enum State { 210 enum State {
211 STATE_NONE, 211 STATE_NONE,
212 STATE_RESOLVE_PROXY, 212 STATE_RESOLVE_PROXY,
213 STATE_RESOLVE_PROXY_COMPLETE, 213 STATE_RESOLVE_PROXY_COMPLETE,
214 STATE_RESOLVE_HOST, 214 STATE_RESOLVE_HOST,
215 STATE_RESOLVE_HOST_COMPLETE, 215 STATE_RESOLVE_HOST_COMPLETE,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 bool server_closed_; 344 bool server_closed_;
345 345
346 scoped_ptr<SocketStreamMetrics> metrics_; 346 scoped_ptr<SocketStreamMetrics> metrics_;
347 347
348 DISALLOW_COPY_AND_ASSIGN(SocketStream); 348 DISALLOW_COPY_AND_ASSIGN(SocketStream);
349 }; 349 };
350 350
351 } // namespace net 351 } // namespace net
352 352
353 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ 353 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_server_socket_libevent.h ('k') | net/tools/flip_server/acceptor_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698