diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 22:06:02 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 22:06:02 +0000 |
commit | 860361a1e205970f52ec2ab3807a3f75d6b697f9 (patch) | |
tree | d782ba10c303a3772e346b2caa55f3cb699afc9f /net/url_request/url_request_job_manager.h | |
parent | 74c41ec982c466765acb2f48740ec5e65e8ec505 (diff) | |
download | chromium_src-860361a1e205970f52ec2ab3807a3f75d6b697f9.zip chromium_src-860361a1e205970f52ec2ab3807a3f75d6b697f9.tar.gz chromium_src-860361a1e205970f52ec2ab3807a3f75d6b697f9.tar.bz2 |
More net files brought into compilation for Mac/Linux.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job_manager.h')
-rw-r--r-- | net/url_request/url_request_job_manager.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/url_request/url_request_job_manager.h b/net/url_request/url_request_job_manager.h index f10d5ee..ded3842 100644 --- a/net/url_request/url_request_job_manager.h +++ b/net/url_request/url_request_job_manager.h @@ -33,6 +33,7 @@ #include <map> #include "base/lock.h" +#include "base/platform_thread.h" #include "net/url_request/url_request.h" // This class is responsible for managing the set of protocol factories and @@ -81,16 +82,19 @@ class URLRequestJobManager { #ifndef NDEBUG // We use this to assert that CreateJob and the registration functions all // run on the same thread. - mutable HANDLE allowed_thread_; + mutable int allowed_thread_; + mutable bool allowed_thread_initialized_; // The first guy to call this function sets the allowed thread. This way we // avoid needing to define that thread externally. Since we expect all // callers to be on the same thread, we don't worry about threads racing to // set the allowed thread. bool IsAllowedThread() const { - if (!allowed_thread_) - allowed_thread_ = GetCurrentThread(); - return allowed_thread_ == GetCurrentThread(); + if (!allowed_thread_initialized_) { + allowed_thread_ = PlatformThread::CurrentId(); + allowed_thread_initialized_ = true; + } + return allowed_thread_ == PlatformThread::CurrentId(); } #endif |