Bug 798350 - Remove ChildProcessHost::resource_dispatcher_host_ since it is unused, and simplify the ChildProcessHost constructor; r=cjones
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 05 Oct 2012 16:09:46 -0400
changeset 109449 0579a7cef6947841cc6f98e18ac3eac878890aaf
parent 109448 b0431ae9cad50727b11a6e37dfd362b1f494c7e2
child 109450 b9d3402e928530e125865950b08de731a60c853e
push id23630
push useremorley@mozilla.com
push dateSat, 06 Oct 2012 19:35:27 +0000
treeherdermozilla-central@9f677c2bb33d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs798350
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 798350 - Remove ChildProcessHost::resource_dispatcher_host_ since it is unused, and simplify the ChildProcessHost constructor; r=cjones
ipc/chromium/src/chrome/common/child_process_host.cc
ipc/chromium/src/chrome/common/child_process_host.h
--- a/ipc/chromium/src/chrome/common/child_process_host.cc
+++ b/ipc/chromium/src/chrome/common/child_process_host.cc
@@ -42,22 +42,20 @@ class ChildNotificationTask : public Tas
   NotificationType notification_type_;
   ChildProcessInfo info_;
 };
 
 }  // namespace
 
 
 
-ChildProcessHost::ChildProcessHost(
-    ProcessType type, ResourceDispatcherHost* resource_dispatcher_host)
+ChildProcessHost::ChildProcessHost(ProcessType type)
     :
       ChildProcessInfo(type),
       ALLOW_THIS_IN_INITIALIZER_LIST(listener_(this)),
-      resource_dispatcher_host_(resource_dispatcher_host),
       opening_channel_(false),
       process_event_(NULL) {
   Singleton<ChildProcessList>::get()->push_back(this);
 }
 
 
 ChildProcessHost::~ChildProcessHost() {
   Singleton<ChildProcessList>::get()->remove(this);
--- a/ipc/chromium/src/chrome/common/child_process_host.h
+++ b/ipc/chromium/src/chrome/common/child_process_host.h
@@ -7,17 +7,16 @@
 
 #include "build/build_config.h"
 
 #include <list>
 
 #include "base/basictypes.h"
 #include "base/scoped_ptr.h"
 #include "base/waitable_event_watcher.h"
-class ResourceDispatcherHost;
 #include "chrome/common/child_process_info.h"
 #include "chrome/common/ipc_channel.h"
 
 class NotificationType;
 
 // Plugins/workers and other child processes that live on the IO thread should
 // derive from this class.
 class ChildProcessHost :
@@ -47,18 +46,17 @@ class ChildProcessHost :
 
    private:
     bool all_;
     ProcessType type_;
     std::list<ChildProcessHost*>::iterator iterator_;
   };
 
  protected:
-  ChildProcessHost(ProcessType type,
-                   ResourceDispatcherHost* resource_dispatcher_host = 0);
+  explicit ChildProcessHost(ProcessType type);
 
   // Derived classes return true if it's ok to shut down the child process.
   virtual bool CanShutdown() = 0;
 
   // Creates the IPC channel.  Returns true iff it succeeded.
   bool CreateChannel();
 
   // Once the subclass gets a handle to the process, it needs to tell
@@ -101,18 +99,16 @@ class ChildProcessHost :
     virtual void OnChannelError();
     virtual void GetQueuedMessages(std::queue<IPC::Message>& queue);
    private:
     ChildProcessHost* host_;
   };
 
   ListenerHook listener_;
 
-  ResourceDispatcherHost* resource_dispatcher_host_;
-
   // True while we're waiting the channel to be opened.
   bool opening_channel_;
 
   // The IPC::Channel.
   scoped_ptr<IPC::Channel> channel_;
 
   // IPC Channel's id.
   std::wstring channel_id_;