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 | |
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
-rw-r--r-- | net/SConscript | 12 | ||||
-rw-r--r-- | net/net.xcodeproj/project.pbxproj | 12 | ||||
-rw-r--r-- | net/url_request/url_request_job_manager.cc | 3 | ||||
-rw-r--r-- | net/url_request/url_request_job_manager.h | 12 |
4 files changed, 28 insertions, 11 deletions
diff --git a/net/SConscript b/net/SConscript index 10a58f0..932e25d 100644 --- a/net/SConscript +++ b/net/SConscript @@ -84,14 +84,20 @@ input_files = [ 'disk_cache/stats.cc', 'disk_cache/trace.cc', 'http/cert_status_cache.cc', + 'http/http_cache.cc', 'http/http_chunked_decoder.cc', 'http/http_response_headers.cc', 'http/http_util.cc', 'http/http_vary_data.cc', 'url_request/mime_sniffer_proxy.cc', + 'url_request/url_request.cc', + 'url_request/url_request_about_job.cc', 'url_request/url_request_error_job.cc', + 'url_request/url_request_http_job.cc', + 'url_request/url_request_job.cc', 'url_request/url_request_job_metrics.cc', 'url_request/url_request_job_tracker.cc', + 'url_request/url_request_simple_job.cc', 'url_request/url_request_view_cache_job.cc', ] @@ -111,7 +117,6 @@ if env['PLATFORM'] == 'win32': 'base/wininet_util.cc', 'base/winsock_init.cc', 'base/x509_certificate.cc', - 'http/http_cache.cc', 'http/http_network_layer.cc', 'http/http_network_transaction.cc', 'http/http_transaction_winhttp.cc', @@ -119,17 +124,12 @@ if env['PLATFORM'] == 'win32': 'proxy/proxy_resolver_fixed.cc', 'proxy/proxy_resolver_winhttp.cc', 'proxy/proxy_service.cc', - 'url_request/url_request.cc', - 'url_request/url_request_about_job.cc', 'url_request/url_request_file_dir_job.cc', 'url_request/url_request_file_job.cc', 'url_request/url_request_filter.cc', 'url_request/url_request_ftp_job.cc', - 'url_request/url_request_http_job.cc', 'url_request/url_request_inet_job.cc', - 'url_request/url_request_job.cc', 'url_request/url_request_job_manager.cc', - 'url_request/url_request_simple_job.cc', 'url_request/url_request_test_job.cc', ]) diff --git a/net/net.xcodeproj/project.pbxproj b/net/net.xcodeproj/project.pbxproj index 14d921b..b45a5a2 100644 --- a/net/net.xcodeproj/project.pbxproj +++ b/net/net.xcodeproj/project.pbxproj @@ -93,6 +93,12 @@ 821F21130E5CD662003C7E38 /* http_vary_data_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33470E5A194700A747DB /* http_vary_data_unittest.cc */; }; 821F21300E5CD746003C7E38 /* http_response_headers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33440E5A194700A747DB /* http_response_headers.cc */; }; 821F21320E5CD756003C7E38 /* http_response_headers_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33480E5A194700A747DB /* http_response_headers_unittest.cc */; }; + 821F23670E5E0D2F003C7E38 /* upload_data.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32890E5A181C00A747DB /* upload_data.cc */; }; + 821F236C0E5E0EF8003C7E38 /* url_request_http_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33B60E5A198600A747DB /* url_request_http_job.cc */; }; + 821F23710E5E0F15003C7E38 /* url_request.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33B10E5A198600A747DB /* url_request.cc */; }; + 821F23C30E5E105E003C7E38 /* url_request_about_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33A20E5A198600A747DB /* url_request_about_job.cc */; }; + 821F23CA0E5E106B003C7E38 /* url_request_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33980E5A198600A747DB /* url_request_job.cc */; }; + 821F23CC0E5E106D003C7E38 /* url_request_simple_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED339C0E5A198600A747DB /* url_request_simple_job.cc */; }; 825C2FCC0E5C968B00FDEAB7 /* ev_root_ca_metadata.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32BE0E5A181C00A747DB /* ev_root_ca_metadata.cc */; }; 82ECB3090E5B651D00A913E3 /* mime_sniffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32AD0E5A181C00A747DB /* mime_sniffer.cc */; }; BAA46E3B0E5CE99A00E77460 /* net_util_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED329F0E5A181C00A747DB /* net_util_unittest.cc */; }; @@ -1215,9 +1221,15 @@ 7B8B5B560E5CEADE002F9A97 /* registry_controlled_domain.cc in Sources */, 7B8504410E5B2E9600730B43 /* stats.cc in Sources */, 7B8504450E5B2E9600730B43 /* trace.cc in Sources */, + 821F23670E5E0D2F003C7E38 /* upload_data.cc in Sources */, + 821F23710E5E0F15003C7E38 /* url_request.cc in Sources */, + 821F23C30E5E105E003C7E38 /* url_request_about_job.cc in Sources */, 7B85044A0E5B2E9600730B43 /* url_request_error_job.cc in Sources */, + 821F236C0E5E0EF8003C7E38 /* url_request_http_job.cc in Sources */, + 821F23CA0E5E106B003C7E38 /* url_request_job.cc in Sources */, 7B8504530E5B2E9600730B43 /* url_request_job_metrics.cc in Sources */, 7B8504540E5B2E9600730B43 /* url_request_job_tracker.cc in Sources */, + 821F23CC0E5E106D003C7E38 /* url_request_simple_job.cc in Sources */, 821F20A50E5CD414003C7E38 /* url_request_view_cache_job.cc in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc index 52fcd30..17edb67 100644 --- a/net/url_request/url_request_job_manager.cc +++ b/net/url_request/url_request_job_manager.cc @@ -53,7 +53,8 @@ static const struct { URLRequestJobManager::URLRequestJobManager() { #ifndef NDEBUG - allowed_thread_ = NULL; + allowed_thread_ = 0; + allowed_thread_initialized_ = false; #endif } 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 |