diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 23:11:34 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 23:11:34 +0000 |
commit | 3589e5546b68529918cb47fc74e3544f630cb889 (patch) | |
tree | a8e55dfe05fe38b70fc6496ab9d0cc9a82696fb0 /net | |
parent | d18841236d72d85f8a3f0f3d6a1a06db334ae686 (diff) | |
download | chromium_src-3589e5546b68529918cb47fc74e3544f630cb889.zip chromium_src-3589e5546b68529918cb47fc74e3544f630cb889.tar.gz chromium_src-3589e5546b68529918cb47fc74e3544f630cb889.tar.bz2 |
More of net compiling on the Mac.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/SConscript | 14 | ||||
-rw-r--r-- | net/http/http_response_headers_unittest.cc | 15 | ||||
-rw-r--r-- | net/net.xcodeproj/project.pbxproj | 76 | ||||
-rw-r--r-- | net/url_request/url_request.h | 2 | ||||
-rw-r--r-- | net/url_request/url_request_http_job.cc | 4 |
5 files changed, 63 insertions, 48 deletions
diff --git a/net/SConscript b/net/SConscript index bf191e0..17828fc 100644 --- a/net/SConscript +++ b/net/SConscript @@ -79,11 +79,16 @@ input_files = [ 'disk_cache/rankings.cc', 'disk_cache/stats.cc', 'disk_cache/trace.cc', + 'http/cert_status_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_error_job.cc', 'url_request/url_request_job_metrics.cc', 'url_request/url_request_job_tracker.cc', + 'url_request/url_request_view_cache_job.cc', ] if env['PLATFORM'] == 'win32': @@ -107,18 +112,14 @@ if env['PLATFORM'] == 'win32': 'base/wininet_util.cc', 'base/winsock_init.cc', 'base/x509_certificate.cc', - 'http/cert_status_cache.cc', 'http/http_cache.cc', 'http/http_network_layer.cc', 'http/http_network_transaction.cc', - 'http/http_response_headers.cc', 'http/http_transaction_winhttp.cc', - 'http/http_vary_data.cc', 'http/winhttp_request_throttle.cc', 'proxy/proxy_resolver_fixed.cc', 'proxy/proxy_resolver_winhttp.cc', 'proxy/proxy_service.cc', - 'url_request/mime_sniffer_proxy.cc', 'url_request/url_request.cc', 'url_request/url_request_about_job.cc', 'url_request/url_request_file_dir_job.cc', @@ -131,7 +132,6 @@ if env['PLATFORM'] == 'win32': 'url_request/url_request_job_manager.cc', 'url_request/url_request_simple_job.cc', 'url_request/url_request_test_job.cc', - 'url_request/url_request_view_cache_job.cc', ]) if env['PLATFORM'] == 'win32': @@ -233,6 +233,8 @@ unittest_files = [ 'base/escape_unittest.cc', 'base/gzip_filter_unittest.cc', 'disk_cache/addr_unittest.cc', + 'http/http_response_headers_unittest.cc', + 'http/http_vary_data_unittest.cc', '$BASE_DIR/run_all_unittests$OBJSUFFIX', ] @@ -259,11 +261,9 @@ if env['PLATFORM'] == 'win32': 'http/http_cache_unittest.cc', 'http/http_network_layer_unittest.cc', 'http/http_network_transaction_unittest.cc', - 'http/http_response_headers_unittest.cc', 'http/http_transaction_unittest.cc', 'http/http_transaction_winhttp_unittest.cc', 'http/http_util_unittest.cc', - 'http/http_vary_data_unittest.cc', 'http/winhttp_request_throttle_unittest.cc', 'url_request/url_request_unittest.cc', ]) diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc index 45bcaaa..9e81cc3 100644 --- a/net/http/http_response_headers_unittest.cc +++ b/net/http/http_response_headers_unittest.cc @@ -32,7 +32,6 @@ #include "base/basictypes.h" #include "base/pickle.h" #include "base/time.h" -#include "net/base/net_util.h" #include "net/http/http_response_headers.h" #include "testing/gtest/include/gtest/gtest.h" @@ -363,7 +362,7 @@ TEST(HttpResponseHeadersTest, Persist) { }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { std::string headers = tests[i].raw_headers; HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed1 = @@ -677,7 +676,7 @@ TEST(HttpResponseHeadersTest, RequiresValidation) { Time::FromString(L"Wed, 28 Nov 2007 00:40:12 GMT", &response_time); Time::FromString(L"Wed, 28 Nov 2007 00:45:20 GMT", ¤t_time); - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string headers(tests[i].headers); HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed = new HttpResponseHeaders(headers); @@ -729,7 +728,7 @@ TEST(HttpResponseHeadersTest, Update) { }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string orig_headers(tests[i].orig_headers); HeadersToRaw(&orig_headers); scoped_refptr<HttpResponseHeaders> parsed = @@ -775,7 +774,7 @@ TEST(HttpResponseHeadersTest, EnumerateHeaderLines) { "Foo: 1, 2, 3\n" }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string headers(tests[i].headers); HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed = @@ -859,7 +858,7 @@ TEST(HttpResponseHeadersTest, IsRedirect) { true }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string headers(tests[i].headers); HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed = @@ -945,7 +944,7 @@ TEST(HttpResponseHeadersTest, GetContentLength) { -1 }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string headers(tests[i].headers); HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed = @@ -995,7 +994,7 @@ TEST(HttpResponseHeadersTest, IsKeepAlive) { false }, }; - for (size_t i = 0; i < arraysize(tests); ++i) { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { string headers(tests[i].headers); HeadersToRaw(&headers); scoped_refptr<HttpResponseHeaders> parsed = diff --git a/net/net.xcodeproj/project.pbxproj b/net/net.xcodeproj/project.pbxproj index e3e17c2..23d3c3c 100644 --- a/net/net.xcodeproj/project.pbxproj +++ b/net/net.xcodeproj/project.pbxproj @@ -81,6 +81,13 @@ 7BED34190E5A1A8600A747DB /* libnet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4BA04540E25613300BE02C6 /* libnet.a */; }; 7BED34450E5A1A9600A747DB /* libbase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BED324A0E5A17C000A747DB /* libbase.a */; }; 7BED34520E5A1ABC00A747DB /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BED32530E5A17C300A747DB /* libgtest.a */; }; + 821F207B0E5CD342003C7E38 /* cert_status_cache.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33610E5A194700A747DB /* cert_status_cache.cc */; }; + 821F207F0E5CD3C6003C7E38 /* http_vary_data.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33520E5A194700A747DB /* http_vary_data.cc */; }; + 821F20A30E5CD407003C7E38 /* mime_sniffer_proxy.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33A60E5A198600A747DB /* mime_sniffer_proxy.cc */; }; + 821F20A50E5CD414003C7E38 /* url_request_view_cache_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33A90E5A198600A747DB /* url_request_view_cache_job.cc */; }; + 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 */; }; 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 */; }; E4AFA6430E5241B400201347 /* run_all_unittests.cc in Sources */ = {isa = PBXBuildFile; fileRef = E4AFA6420E5241B400201347 /* run_all_unittests.cc */; }; @@ -872,44 +879,44 @@ 7BED338A0E5A196C00A747DB /* url_request */ = { isa = PBXGroup; children = ( - 7BED33970E5A198600A747DB /* url_request_file_dir_job.cc */, - 7BED33980E5A198600A747DB /* url_request_job.cc */, - 7BED33990E5A198600A747DB /* url_request_inet_job.h */, - 7BED339A0E5A198600A747DB /* url_request_status.h */, - 7BED339B0E5A198600A747DB /* url_request_simple_job.h */, - 7BED339C0E5A198600A747DB /* url_request_simple_job.cc */, - 7BED339D0E5A198600A747DB /* url_request_job_tracker.h */, - 7BED339E0E5A198600A747DB /* url_request_job_tracker.cc */, - 7BED339F0E5A198600A747DB /* url_request_job_metrics.h */, - 7BED33A00E5A198600A747DB /* url_request_job_metrics.cc */, - 7BED33A10E5A198600A747DB /* url_request_job_manager.h */, - 7BED33A20E5A198600A747DB /* url_request_about_job.cc */, - 7BED33A30E5A198600A747DB /* url_request_job_manager.cc */, - 7BED33A40E5A198600A747DB /* url_request_job.h */, - 7BED33A50E5A198600A747DB /* url_request_error_job.h */, 7BED33A60E5A198600A747DB /* mime_sniffer_proxy.cc */, 7BED33A70E5A198600A747DB /* mime_sniffer_proxy.h */, - 7BED33A80E5A198600A747DB /* url_request_view_cache_job.h */, - 7BED33A90E5A198600A747DB /* url_request_view_cache_job.cc */, - 7BED33AA0E5A198600A747DB /* url_request_unittest.h */, - 7BED33AB0E5A198600A747DB /* url_request_unittest.cc */, - 7BED33AC0E5A198600A747DB /* url_request_test_job.h */, - 7BED33AD0E5A198600A747DB /* url_request_test_job.cc */, + 7BED33B10E5A198600A747DB /* url_request.cc */, 7BED33AE0E5A198600A747DB /* url_request.h */, + 7BED33A20E5A198600A747DB /* url_request_about_job.cc */, + 7BED33B80E5A198600A747DB /* url_request_about_job.h */, + 7BED33B50E5A198600A747DB /* url_request_context.h */, + 7BED33B20E5A198600A747DB /* url_request_error_job.cc */, + 7BED33A50E5A198600A747DB /* url_request_error_job.h */, + 7BED33970E5A198600A747DB /* url_request_file_dir_job.cc */, 7BED33AF0E5A198600A747DB /* url_request_file_dir_job.h */, 7BED33B00E5A198600A747DB /* url_request_file_job.cc */, - 7BED33B10E5A198600A747DB /* url_request.cc */, - 7BED33B20E5A198600A747DB /* url_request_error_job.cc */, - 7BED33B30E5A198600A747DB /* url_request_ftp_job.cc */, + 7BED33BA0E5A198600A747DB /* url_request_file_job.h */, + 7BED33B90E5A198600A747DB /* url_request_filter.cc */, 7BED33B40E5A198600A747DB /* url_request_filter.h */, - 7BED33B50E5A198600A747DB /* url_request_context.h */, - 7BED33B60E5A198600A747DB /* url_request_http_job.cc */, + 7BED33B30E5A198600A747DB /* url_request_ftp_job.cc */, 7BED33B70E5A198600A747DB /* url_request_ftp_job.h */, - 7BED33B80E5A198600A747DB /* url_request_about_job.h */, - 7BED33B90E5A198600A747DB /* url_request_filter.cc */, - 7BED33BA0E5A198600A747DB /* url_request_file_job.h */, - 7BED33BB0E5A198600A747DB /* url_request_inet_job.cc */, + 7BED33B60E5A198600A747DB /* url_request_http_job.cc */, 7BED33BC0E5A198600A747DB /* url_request_http_job.h */, + 7BED33BB0E5A198600A747DB /* url_request_inet_job.cc */, + 7BED33990E5A198600A747DB /* url_request_inet_job.h */, + 7BED33980E5A198600A747DB /* url_request_job.cc */, + 7BED33A40E5A198600A747DB /* url_request_job.h */, + 7BED33A30E5A198600A747DB /* url_request_job_manager.cc */, + 7BED33A10E5A198600A747DB /* url_request_job_manager.h */, + 7BED33A00E5A198600A747DB /* url_request_job_metrics.cc */, + 7BED339F0E5A198600A747DB /* url_request_job_metrics.h */, + 7BED339E0E5A198600A747DB /* url_request_job_tracker.cc */, + 7BED339D0E5A198600A747DB /* url_request_job_tracker.h */, + 7BED339C0E5A198600A747DB /* url_request_simple_job.cc */, + 7BED339B0E5A198600A747DB /* url_request_simple_job.h */, + 7BED339A0E5A198600A747DB /* url_request_status.h */, + 7BED33AD0E5A198600A747DB /* url_request_test_job.cc */, + 7BED33AC0E5A198600A747DB /* url_request_test_job.h */, + 7BED33AB0E5A198600A747DB /* url_request_unittest.cc */, + 7BED33AA0E5A198600A747DB /* url_request_unittest.h */, + 7BED33A90E5A198600A747DB /* url_request_view_cache_job.cc */, + 7BED33A80E5A198600A747DB /* url_request_view_cache_job.h */, ); path = url_request; sourceTree = "<group>"; @@ -1150,7 +1157,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -ex\nexec ${BUILT_PRODUCTS_DIR}/base_unittests\n"; + shellScript = "set -ex\nexec ${BUILT_PRODUCTS_DIR}/net_unittests\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -1166,6 +1173,7 @@ 7B8503FC0E5B2DA200730B43 /* block_files.cc in Sources */, 7BA0172F0E5A244D00044150 /* bzip2_filter.cc in Sources */, 7B8504050E5B2DBD00730B43 /* cache_util_posix.cc in Sources */, + 821F207B0E5CD342003C7E38 /* cert_status_cache.cc in Sources */, 7B8504080E5B2DD800730B43 /* client_socket_handle.cc in Sources */, 7B8504090E5B2DD800730B43 /* client_socket_pool.cc in Sources */, 7B85040C0E5B2DD800730B43 /* cookie_policy.cc in Sources */, @@ -1181,12 +1189,15 @@ 7B8504280E5B2E2A00730B43 /* hash.cc in Sources */, 0482692A0E5B624D00A30786 /* http_cache.cc in Sources */, 7B85042B0E5B2E2A00730B43 /* http_chunked_decoder.cc in Sources */, + 821F21300E5CD746003C7E38 /* http_response_headers.cc in Sources */, 7B85042F0E5B2E4900730B43 /* http_util.cc in Sources */, + 821F207F0E5CD3C6003C7E38 /* http_vary_data.cc in Sources */, 7B8504320E5B2E4900730B43 /* mapped_file_posix.cc in Sources */, 7B8504330E5B2E4900730B43 /* mem_backend_impl.cc in Sources */, 7B8504340E5B2E4900730B43 /* mem_entry_impl.cc in Sources */, 7B8504350E5B2E4900730B43 /* mem_rankings.cc in Sources */, 82ECB3090E5B651D00A913E3 /* mime_sniffer.cc in Sources */, + 821F20A30E5CD407003C7E38 /* mime_sniffer_proxy.cc in Sources */, 048268070E5B3B1000A30786 /* mime_util.cc in Sources */, 7BA015550E5A1C1000044150 /* net_errors.cc in Sources */, 7B8504390E5B2E5700730B43 /* net_module.cc in Sources */, @@ -1198,6 +1209,7 @@ 7B85044A0E5B2E9600730B43 /* url_request_error_job.cc in Sources */, 7B8504530E5B2E9600730B43 /* url_request_job_metrics.cc in Sources */, 7B8504540E5B2E9600730B43 /* url_request_job_tracker.cc in Sources */, + 821F20A50E5CD414003C7E38 /* url_request_view_cache_job.cc in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1214,6 +1226,8 @@ 7B4DF6B10E5B98ED004D7619 /* escape_unittest.cc in Sources */, 7BA0151F0E5A1B9200044150 /* gzip_filter_unittest.cc in Sources */, 048268080E5B3B3200A30786 /* http_chunked_decoder_unittest.cc in Sources */, + 821F21320E5CD756003C7E38 /* http_response_headers_unittest.cc in Sources */, + 821F21130E5CD662003C7E38 /* http_vary_data_unittest.cc in Sources */, 7B4DF9AC0E5C906A004D7619 /* mime_sniffer_unittest.cc in Sources */, 048268090E5B3B4800A30786 /* mime_util_unittest.cc in Sources */, E4AFA6430E5241B400201347 /* run_all_unittests.cc in Sources */, diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index 4e03b2f..26a6258 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -114,6 +114,8 @@ class URLRequest { // class Delegate { public: + virtual ~Delegate() {} + // Called upon a server-initiated redirect. The delegate may call the // request's Cancel method to prevent the redirect from being followed. // Since there may be multiple chained redirects, there may also be more diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 9e89faa..dbcfa05 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -63,14 +63,14 @@ URLRequestJob* URLRequestHttpJob::Factory(URLRequest* request, URLRequestHttpJob::URLRequestHttpJob(URLRequest* request) : URLRequestJob(request), - context_(request->context()), transaction_(NULL), response_info_(NULL), proxy_auth_state_(net::AUTH_STATE_DONT_NEED_AUTH), server_auth_state_(net::AUTH_STATE_DONT_NEED_AUTH), start_callback_(this, &URLRequestHttpJob::OnStartCompleted), read_callback_(this, &URLRequestHttpJob::OnReadCompleted), - read_in_progress_(false) { + read_in_progress_(false), + context_(request->context()) { } URLRequestHttpJob::~URLRequestHttpJob() { |