diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 01:55:13 +0000 |
commit | 4566f13fe843c0821dbce19d7ea5e8aece8afe4a (patch) | |
tree | 586c6006431604f6b159daca30fcdfe4913ad996 /chrome/browser/renderer_host/render_process_host.h | |
parent | 3f366001f70b1ef4b8884796970cefb0769c469f (diff) | |
download | chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.zip chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.gz chromium_src-4566f13fe843c0821dbce19d7ea5e8aece8afe4a.tar.bz2 |
Stop having renderers use both pids and a monotonically increasing "host_id". This allows ResourceDispatcher to be used by child processes other than renderers. I've done minor related cleanup on the way to make the code simpler.
Review URL: http://codereview.chromium.org/42054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_process_host.h')
-rw-r--r-- | chrome/browser/renderer_host/render_process_host.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/chrome/browser/renderer_host/render_process_host.h b/chrome/browser/renderer_host/render_process_host.h index 4f8179c..6e59166 100644 --- a/chrome/browser/renderer_host/render_process_host.h +++ b/chrome/browser/renderer_host/render_process_host.h @@ -33,10 +33,10 @@ class RenderProcessHost : public IPC::Channel::Sender, // Returns the user profile associated with this renderer process. Profile* profile() const { return profile_; } - // Returns the unique identifier for this host. This can be used later in + // Returns the process id for this host. This can be used later in // a call to FromID() to get back to this object (this is used to avoid // sending non-threadsafe pointers to other threads). - int host_id() const { return host_id_; } + int pid() const { return pid_; } // Returns the process object associated with the child process. In certain // tests or single-process mode, this will actually represent the current @@ -172,13 +172,8 @@ class RenderProcessHost : public IPC::Channel::Sender, static RenderProcessHost* GetExistingProcessHost(Profile* profile); protected: - // Unregister this object from all globals that reference it. - // This would naturally be part of the destructor, but we destruct - // asynchronously. - // - // This can be overridden by derived classes to add their own unregister code, - // but you should be sure to always call this one AT THE END of your own. - virtual void Unregister(); + // Sets the process of this object, so that others access it using FromID. + void SetProcessID(int pid); base::Process process_; @@ -198,7 +193,7 @@ class RenderProcessHost : public IPC::Channel::Sender, bool notified_termination_; private: - int host_id_; + int pid_; Profile* profile_; |