diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 17:27:45 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 17:27:45 +0000 |
commit | 76543b9c43515c8c68413b25d682b7c15a151905 (patch) | |
tree | 3fa26b07a2de8102561d5ded5828797fa9a375ab /net | |
parent | f341f8f58ceeae4efe38daf3c26ad4581f98fd2d (diff) | |
download | chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.zip chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.gz chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.bz2 |
Replace the RenderProcessHost.PID function that returns the OS-generated
process ID with an internally-generated id() function. This allows us the
guarantee that the IDs are unique over the entire run of the application.
This also cleans up some code associated with managing the PID.
The main potentially interesting change is now the PID is set uniquely for
every creation of RenderProcessHost. It used to be set cleared if the process
went away, and re-set if the process was re-created. The ID generation is in
ChildProcesInfo so it is also unique between workers and plugins. I had to
change some significant things in resource_dispatcher_host_unittest to take
into account this new generation of IDs.
BUG=17828
TEST=none
Review URL: http://codereview.chromium.org/160203
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/url_request/url_request.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request.h | 10 |
2 files changed, 0 insertions, 12 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index d94c8dc..bf8fd5a 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -5,7 +5,6 @@ #include "net/url_request/url_request.h" #include "base/message_loop.h" -#include "base/process_util.h" #include "base/singleton.h" #include "base/stats_counters.h" #include "base/string_util.h" @@ -53,7 +52,6 @@ URLRequest::URLRequest(const GURL& url, Delegate* delegate) priority_(0) { URLREQUEST_COUNT_CTOR(); SIMPLE_STATS_COUNTER("URLRequestCount"); - origin_pid_ = base::GetCurrentProcId(); // Sanity check out environment. DCHECK(MessageLoop::current()) << diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index c395125..14c6287 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -389,12 +389,6 @@ class URLRequest { int load_flags() const { return load_flags_; } void set_load_flags(int flags) { load_flags_ = flags; } - // Accessors to the pid of the process this request originated from. - int origin_pid() const { return origin_pid_; } - void set_origin_pid(int proc_id) { - origin_pid_ = proc_id; - } - // Returns true if the request is "pending" (i.e., if Start() has been called, // and the response has not yet been called). bool is_pending() const { return is_pending_; } @@ -569,10 +563,6 @@ class URLRequest { int load_flags_; // Flags indicating the request type for the load; // expected values are LOAD_* enums above. - // The pid of the process that initiated this request. Initialized to the id - // of the current process. - int origin_pid_; - Delegate* delegate_; // Current error status of the job. When no error has been encountered, this |