summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authoranand.ratn <anand.ratn@samsung.com>2014-09-10 22:52:30 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-11 05:55:51 +0000
commita36f5b520abe7ce7dc32adae53e36fef4881321c (patch)
tree05b138a4009d0076f2534c3b5413c4bfdce611da /remoting/host
parent056bd0718cbd41e96c5fbb4f47e50e44dc9293bb (diff)
downloadchromium_src-a36f5b520abe7ce7dc32adae53e36fef4881321c.zip
chromium_src-a36f5b520abe7ce7dc32adae53e36fef4881321c.tar.gz
chromium_src-a36f5b520abe7ce7dc32adae53e36fef4881321c.tar.bz2
Declaring the weak_ptr_factory in proper order.
Cleaning up weak_ptr_factory destruction order in "src/remoting" module. WeakPtrFactory should remain the last member so it'll be destroyed and invalidate its weak pointers before any other members are destroyed. BUG=303818 Review URL: https://codereview.chromium.org/551393003 Cr-Commit-Position: refs/heads/master@{#294331}
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/ipc_desktop_environment.cc4
-rw-r--r--remoting/host/ipc_desktop_environment.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/remoting/host/ipc_desktop_environment.cc b/remoting/host/ipc_desktop_environment.cc
index c8d60f3..de1f156 100644
--- a/remoting/host/ipc_desktop_environment.cc
+++ b/remoting/host/ipc_desktop_environment.cc
@@ -93,8 +93,8 @@ IpcDesktopEnvironmentFactory::IpcDesktopEnvironmentFactory(
io_task_runner_(io_task_runner),
curtain_enabled_(false),
daemon_channel_(daemon_channel),
- connector_factory_(this),
- next_id_(0) {
+ next_id_(0),
+ connector_factory_(this) {
}
IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() {
diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h
index ca3dfcd..b5f5420 100644
--- a/remoting/host/ipc_desktop_environment.h
+++ b/remoting/host/ipc_desktop_environment.h
@@ -128,14 +128,14 @@ class IpcDesktopEnvironmentFactory
typedef std::map<int, DesktopSessionProxy*> ActiveConnectionsList;
ActiveConnectionsList active_connections_;
- // Factory for weak pointers to DesktopSessionConnector interface.
- base::WeakPtrFactory<DesktopSessionConnector> connector_factory_;
-
// Next desktop session ID. IDs are allocated sequentially starting from 0.
// This gives us more than 67 years of unique IDs assuming a new ID is
// allocated every second.
int next_id_;
+ // Factory for weak pointers to DesktopSessionConnector interface.
+ base::WeakPtrFactory<DesktopSessionConnector> connector_factory_;
+
DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory);
};