diff options
author | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 13:58:48 +0000 |
---|---|---|
committer | deanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 13:58:48 +0000 |
commit | f18953d3c2a4eae2bc33b1eecce96e28f0815a64 (patch) | |
tree | a622590c37a649b6f6f4182f01bf7ee09d941118 /net/url_request | |
parent | d0abe5441d5a1f4e29121b4ec68f781090bef5a1 (diff) | |
download | chromium_src-f18953d3c2a4eae2bc33b1eecce96e28f0815a64.zip chromium_src-f18953d3c2a4eae2bc33b1eecce96e28f0815a64.tar.gz chromium_src-f18953d3c2a4eae2bc33b1eecce96e28f0815a64.tar.bz2 |
Remove unnecessary use of atomic operations. Getting the pid on windows is very fast (just a fetch from the PEB). If this turns out to be expensive on other platforms, we might want to add caching methods to process_util.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index 74619eb..282a0f0 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -51,9 +51,6 @@ using std::wstring; // Max number of http redirects to follow. Same number as gecko. const static int kMaxRedirects = 20; -// The id of the current process. Lazily initialized. -static int32 current_proc_id = -1; - static URLRequestJobManager* GetJobManager() { return Singleton<URLRequestJobManager>::get(); } @@ -74,9 +71,7 @@ URLRequest::URLRequest(const GURL& url, Delegate* delegate) final_upload_progress_(0) { URLREQUEST_COUNT_CTOR(); SIMPLE_STATS_COUNTER(L"URLRequestCount"); - if (current_proc_id == -1) - base::AtomicSwap(¤t_proc_id, process_util::GetCurrentProcId()); - origin_pid_ = current_proc_id; + origin_pid_ = process_util::GetCurrentProcId(); } URLRequest::~URLRequest() { |