summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 20:06:30 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-30 20:06:30 +0000
commit20f0487a5b73e8071af2612150301b0942cbf0e2 (patch)
treeecee69b28f16712bdc1558ac0a015ac80095c761 /net/socket
parent167b0dd17d5ed57ff293b6480ccaed706e0bc9cb (diff)
downloadchromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.zip
chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.gz
chromium_src-20f0487a5b73e8071af2612150301b0942cbf0e2.tar.bz2
FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs.
Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on a whole bunch of virtual dtors that were missing it. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3522004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/client_socket_pool.cc4
-rw-r--r--net/socket/client_socket_pool.h4
-rw-r--r--net/socket/client_socket_pool_histograms.h4
-rw-r--r--net/socket/socket_test_util.cc12
-rw-r--r--net/socket/socket_test_util.h8
-rw-r--r--net/socket/ssl_client_socket_pool.cc1
-rw-r--r--net/socket/tcp_client_socket_pool.cc1
7 files changed, 25 insertions, 9 deletions
diff --git a/net/socket/client_socket_pool.cc b/net/socket/client_socket_pool.cc
index 4cefe8d..a54109e 100644
--- a/net/socket/client_socket_pool.cc
+++ b/net/socket/client_socket_pool.cc
@@ -26,4 +26,8 @@ void ClientSocketPool::set_unused_idle_socket_timeout(int timeout) {
g_unused_idle_socket_timeout = timeout;
}
+ClientSocketPool::ClientSocketPool() {}
+
+ClientSocketPool::~ClientSocketPool() {}
+
} // namespace net
diff --git a/net/socket/client_socket_pool.h b/net/socket/client_socket_pool.h
index c727345..ad5f1ae 100644
--- a/net/socket/client_socket_pool.h
+++ b/net/socket/client_socket_pool.h
@@ -124,8 +124,8 @@ class ClientSocketPool {
static void set_unused_idle_socket_timeout(int timeout);
protected:
- ClientSocketPool() {}
- virtual ~ClientSocketPool() {}
+ ClientSocketPool();
+ virtual ~ClientSocketPool();
// Return the connection timeout for this pool.
virtual base::TimeDelta ConnectionTimeout() const = 0;
diff --git a/net/socket/client_socket_pool_histograms.h b/net/socket/client_socket_pool_histograms.h
index 74be341..9c12e5d 100644
--- a/net/socket/client_socket_pool_histograms.h
+++ b/net/socket/client_socket_pool_histograms.h
@@ -8,8 +8,10 @@
#include <string>
-#include "base/histogram.h"
#include "base/ref_counted.h"
+#include "base/time.h"
+
+class Histogram;
namespace net {
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 0c181b6..32623de 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -989,6 +989,18 @@ SSLClientSocket* DeterministicMockClientSocketFactory::CreateSSLClientSocket(
return socket;
}
+TestSocketRequest::TestSocketRequest(
+ std::vector<TestSocketRequest*>* request_order,
+ size_t* completion_count)
+ : request_order_(request_order),
+ completion_count_(completion_count) {
+ DCHECK(request_order);
+ DCHECK(completion_count);
+}
+
+TestSocketRequest::~TestSocketRequest() {
+}
+
int TestSocketRequest::WaitForResult() {
return callback_.WaitForResult();
}
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 7f83a70..c76dfae 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -683,12 +683,8 @@ class TestSocketRequest : public CallbackRunner< Tuple1<int> > {
public:
TestSocketRequest(
std::vector<TestSocketRequest*>* request_order,
- size_t* completion_count)
- : request_order_(request_order),
- completion_count_(completion_count) {
- DCHECK(request_order);
- DCHECK(completion_count);
- }
+ size_t* completion_count);
+ virtual ~TestSocketRequest();
ClientSocketHandle* handle() { return &handle_; }
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index c065658..6069f4d 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -4,6 +4,7 @@
#include "net/socket/ssl_client_socket_pool.h"
+#include "base/histogram.h"
#include "base/values.h"
#include "net/base/net_errors.h"
#include "net/base/ssl_cert_request_info.h"
diff --git a/net/socket/tcp_client_socket_pool.cc b/net/socket/tcp_client_socket_pool.cc
index 89b000e..bea4dff 100644
--- a/net/socket/tcp_client_socket_pool.cc
+++ b/net/socket/tcp_client_socket_pool.cc
@@ -5,6 +5,7 @@
#include "net/socket/tcp_client_socket_pool.h"
#include "base/compiler_specific.h"
+#include "base/histogram.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"