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
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user