summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-25 09:08:19 +0000
commit3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19 (patch)
treeb26f7f81e48a95473eb4af5304301e9d8cd22fb8 /net/tools
parenteef99b6591d82399096abdcee07dd67359eec036 (diff)
downloadchromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.zip
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.gz
chromium_src-3690ebe09a8c3cea0fd7d9ece8f5b8d8ebc65c19.tar.bz2
Virtual destructors should have virtual keyword.
Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/flip_server/acceptor_thread.h3
-rw-r--r--net/tools/flip_server/simple_buffer.cc6
-rw-r--r--net/tools/flip_server/simple_buffer.h5
-rw-r--r--net/tools/flip_server/sm_connection.cc7
-rw-r--r--net/tools/flip_server/sm_connection.h6
5 files changed, 13 insertions, 14 deletions
diff --git a/net/tools/flip_server/acceptor_thread.h b/net/tools/flip_server/acceptor_thread.h
index 8a30532..b378e4d 100644
--- a/net/tools/flip_server/acceptor_thread.h
+++ b/net/tools/flip_server/acceptor_thread.h
@@ -46,7 +46,7 @@ class SMAcceptorThread : public base::SimpleThread,
public SMConnectionPoolInterface {
public:
SMAcceptorThread(FlipAcceptor *acceptor, MemoryCache* memory_cache);
- ~SMAcceptorThread();
+ virtual ~SMAcceptorThread();
// EpollCallbackInteface interface
virtual void OnRegistration(EpollServer* eps, int fd, int event_mask) {}
@@ -92,4 +92,3 @@ class SMAcceptorThread : public base::SimpleThread,
} // namespace net
#endif // NET_TOOLS_FLIP_SERVER_ACCEPTOR_THREAD_H_
-
diff --git a/net/tools/flip_server/simple_buffer.cc b/net/tools/flip_server/simple_buffer.cc
index 569e505..d94153b 100644
--- a/net/tools/flip_server/simple_buffer.cc
+++ b/net/tools/flip_server/simple_buffer.cc
@@ -37,6 +37,11 @@ SimpleBuffer::SimpleBuffer(int size)
storage_ = new char[size];
}
+SimpleBuffer::~SimpleBuffer() {
+ delete[] storage_;
+}
+
+
////////////////////////////////////////////////////////////////////////////////
int SimpleBuffer::ReadableBytes() const {
@@ -201,4 +206,3 @@ inline void SimpleBuffer::AdvanceWritablePtr(int amount_to_advance) {
}
} // namespace net
-
diff --git a/net/tools/flip_server/simple_buffer.h b/net/tools/flip_server/simple_buffer.h
index fee7d4b..831531d 100644
--- a/net/tools/flip_server/simple_buffer.h
+++ b/net/tools/flip_server/simple_buffer.h
@@ -16,9 +16,7 @@ class SimpleBuffer : public BufferInterface {
public:
SimpleBuffer();
explicit SimpleBuffer(int size);
- virtual ~SimpleBuffer() {
- delete[] storage_;
- }
+ virtual ~SimpleBuffer();
std::string str() const;
@@ -92,4 +90,3 @@ class SimpleBuffer : public BufferInterface {
} // namespace net
#endif // NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
-
diff --git a/net/tools/flip_server/sm_connection.cc b/net/tools/flip_server/sm_connection.cc
index b57c5a9..f47b502 100644
--- a/net/tools/flip_server/sm_connection.cc
+++ b/net/tools/flip_server/sm_connection.cc
@@ -23,6 +23,11 @@ namespace net {
// static
bool SMConnection::force_spdy_ = false;
+DataFrame::~DataFrame() {
+ if (delete_when_done)
+ delete[] data;
+}
+
SMConnection::SMConnection(EpollServer* epoll_server,
SSLState* ssl_state,
MemoryCache* memory_cache,
@@ -659,5 +664,3 @@ SMConnection* SMConnection::NewSMConnection(EpollServer* epoll_server,
}
} // namespace net
-
-
diff --git a/net/tools/flip_server/sm_connection.h b/net/tools/flip_server/sm_connection.h
index 044f311..aa91890 100644
--- a/net/tools/flip_server/sm_connection.h
+++ b/net/tools/flip_server/sm_connection.h
@@ -32,10 +32,7 @@ class DataFrame {
bool delete_when_done;
size_t index;
DataFrame() : data(NULL), size(0), delete_when_done(false), index(0) {}
- virtual ~DataFrame() {
- if (delete_when_done)
- delete[] data;
- }
+ virtual ~DataFrame();
};
typedef std::list<DataFrame*> OutputList;
@@ -160,4 +157,3 @@ class SMConnection : public SMConnectionInterface,
} // namespace net
#endif // NET_TOOLS_FLIP_SERVER_SM_CONNECTION_H_
-