summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 17:08:20 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 17:08:20 +0000
commit601858c0f72ea9693a4796fe6b48558efde46ed7 (patch)
treef9102a4e748ce2f2257f86a748ba6ecfb7087141 /ipc
parenta0709c0dafd07a463a1e9b3553554a0be6cec862 (diff)
downloadchromium_src-601858c0f72ea9693a4796fe6b48558efde46ed7.zip
chromium_src-601858c0f72ea9693a4796fe6b48558efde46ed7.tar.gz
chromium_src-601858c0f72ea9693a4796fe6b48558efde46ed7.tar.bz2
FBTF: Move more ctors/dtors from headers to implementation.
- Adding/Moving dtors of objects that have CancelableRequestConsumers shaves three megs off browser.a. - Adding/Moving dtors of objects that have ScopedRunnableMethodFactories only shaved 100k off browser.a/renderer.a. - Adding/Moving dtors of objects that used some form of base::*Timer<> was negligible; there were only a few classes that had a Timer but had a ctor/dtor in the header after the previous cleanups. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3278006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_channel_posix.cc4
-rw-r--r--ipc/ipc_channel_posix.h2
-rw-r--r--ipc/ipc_channel_win.cc4
-rw-r--r--ipc/ipc_channel_win.h2
4 files changed, 10 insertions, 2 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 3f910cf..e4852b4 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -295,6 +295,10 @@ Channel::ChannelImpl::ChannelImpl(const std::string& channel_id, Mode mode,
}
}
+Channel::ChannelImpl::~ChannelImpl() {
+ Close();
+}
+
// static
void AddChannelSocket(const std::string& name, int socket) {
Singleton<PipeMap>()->Insert(name, socket);
diff --git a/ipc/ipc_channel_posix.h b/ipc/ipc_channel_posix.h
index 15f5f5e..b7818a2 100644
--- a/ipc/ipc_channel_posix.h
+++ b/ipc/ipc_channel_posix.h
@@ -40,7 +40,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
public:
// Mirror methods of Channel, see ipc_channel.h for description.
ChannelImpl(const std::string& channel_id, Mode mode, Listener* listener);
- ~ChannelImpl() { Close(); }
+ ~ChannelImpl();
bool Connect();
void Close();
void set_listener(Listener* listener) { listener_ = listener; }
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index be98707..051bb8d 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -48,6 +48,10 @@ Channel::ChannelImpl::ChannelImpl(const std::string& channel_id, Mode mode,
}
}
+Channel::ChannelImpl::~ChannelImpl() {
+ Close();
+}
+
void Channel::ChannelImpl::Close() {
if (thread_check_.get()) {
DCHECK(thread_check_->CalledOnValidThread());
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h
index 6965fd8..ccaa6f4 100644
--- a/ipc/ipc_channel_win.h
+++ b/ipc/ipc_channel_win.h
@@ -22,7 +22,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::IOHandler {
public:
// Mirror methods of Channel, see ipc_channel.h for description.
ChannelImpl(const std::string& channel_id, Mode mode, Listener* listener);
- ~ChannelImpl() { Close(); }
+ ~ChannelImpl();
bool Connect();
void Close();
void set_listener(Listener* listener) { listener_ = listener; }