diff options
30 files changed, 100 insertions, 19 deletions
diff --git a/chrome/browser/download/download_file_manager.cc b/chrome/browser/download/download_file_manager.cc index c2cd5d0..2862742 100644 --- a/chrome/browser/download/download_file_manager.cc +++ b/chrome/browser/download/download_file_manager.cc @@ -20,6 +20,7 @@ #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "googleurl/src/gurl.h" +#include "net/base/io_buffer.h" #if defined(OS_WIN) #include "app/win_util.h" diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc index c597789..1dd598e 100644 --- a/chrome/browser/net/connection_tester.cc +++ b/chrome/browser/net/connection_tester.cc @@ -13,6 +13,7 @@ #include "chrome/common/chrome_switches.h" #include "net/base/cookie_monster.h" #include "net/base/host_resolver_impl.h" +#include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/base/ssl_config_service_defaults.h" diff --git a/chrome/browser/renderer_host/download_resource_handler.cc b/chrome/browser/renderer_host/download_resource_handler.cc index 922fb4e..a58ea6b 100644 --- a/chrome/browser/renderer_host/download_resource_handler.cc +++ b/chrome/browser/renderer_host/download_resource_handler.cc @@ -13,6 +13,7 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/common/resource_response.h" #include "net/base/io_buffer.h" +#include "net/http/http_response_headers.h" #include "net/url_request/url_request_context.h" DownloadResourceHandler::DownloadResourceHandler( diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h index 060e4f0..20179f4 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.h +++ b/chrome/browser/renderer_host/resource_dispatcher_host.h @@ -20,6 +20,7 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" #include "base/observer_list.h" +#include "base/scoped_ptr.h" #include "base/timer.h" #include "chrome/common/child_process_info.h" #include "chrome/browser/renderer_host/resource_queue.h" diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc index db1ebd2..c123007 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/resource_message_filter.cc @@ -75,6 +75,7 @@ #include "gfx/native_widget_types.h" #include "net/base/cookie_monster.h" #include "net/base/file_stream.h" +#include "net/base/io_buffer.h" #include "net/base/keygen_handler.h" #include "net/base/load_flags.h" #include "net/base/mime_util.h" diff --git a/chrome/browser/renderer_host/resource_queue_unittest.cc b/chrome/browser/renderer_host/resource_queue_unittest.cc index 2a6891d..1f002d5 100644 --- a/chrome/browser/renderer_host/resource_queue_unittest.cc +++ b/chrome/browser/renderer_host/resource_queue_unittest.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/message_loop.h" +#include "base/scoped_ptr.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/renderer_host/global_request_id.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc index 7f8e13c..71e08a3 100644 --- a/net/http/http_auth_controller.cc +++ b/net/http/http_auth_controller.cc @@ -5,12 +5,14 @@ #include "net/http/http_auth_controller.h" #include "base/utf_string_conversions.h" +#include "net/base/auth.h" #include "net/base/host_resolver.h" #include "net/base/net_util.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_network_session.h" #include "net/http/http_request_headers.h" #include "net/http/http_request_info.h" +#include "net/http/http_response_headers.h" namespace net { @@ -352,6 +354,10 @@ void HttpAuthController::OnIOComplete(int result) { } } +scoped_refptr<AuthChallengeInfo> HttpAuthController::auth_info() { + return auth_info_; +} + bool HttpAuthController::IsAuthSchemeDisabled(const std::string& scheme) const { return disabled_schemes_.find(scheme) != disabled_schemes_.end(); } diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h index be335ba..cb2c444 100644 --- a/net/http/http_auth_controller.h +++ b/net/http/http_auth_controller.h @@ -67,9 +67,7 @@ class HttpAuthController : public base::RefCounted<HttpAuthController> { return handler_.get() && !identity_.invalid; } - virtual scoped_refptr<AuthChallengeInfo> auth_info() { - return auth_info_; - } + virtual scoped_refptr<AuthChallengeInfo> auth_info(); virtual bool IsAuthSchemeDisabled(const std::string& scheme) const; virtual void DisableAuthScheme(const std::string& scheme); diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc index 5ffa829..0e71b45 100644 --- a/net/http/http_basic_stream.cc +++ b/net/http/http_basic_stream.cc @@ -4,6 +4,10 @@ #include "net/http/http_basic_stream.h" +#include "net/base/io_buffer.h" +#include "net/base/net_errors.h" +#include "net/http/http_stream_parser.h" + namespace net { HttpBasicStream::HttpBasicStream(ClientSocketHandle* connection) @@ -39,7 +43,7 @@ int HttpBasicStream::ReadResponseHeaders(CompletionCallback* callback) { return parser_->ReadResponseHeaders(callback); } -HttpResponseInfo* HttpBasicStream::GetResponseInfo() const { +const HttpResponseInfo* HttpBasicStream::GetResponseInfo() const { return parser_->GetResponseInfo(); } diff --git a/net/http/http_basic_stream.h b/net/http/http_basic_stream.h index 443c020..0c1cbca 100644 --- a/net/http/http_basic_stream.h +++ b/net/http/http_basic_stream.h @@ -13,16 +13,18 @@ #include <string> #include "base/basictypes.h" -#include "net/base/io_buffer.h" +#include "base/scoped_ptr.h" #include "net/http/http_stream.h" -#include "net/http/http_stream_parser.h" namespace net { class BoundNetLog; class ClientSocketHandle; -struct HttpRequestInfo; +class GrowableIOBuffer; class HttpResponseInfo; +struct HttpRequestInfo; +class HttpStreamParser; +class IOBuffer; class UploadDataStream; class HttpBasicStream : public HttpStream { @@ -44,7 +46,7 @@ class HttpBasicStream : public HttpStream { virtual int ReadResponseHeaders(CompletionCallback* callback); - virtual HttpResponseInfo* GetResponseInfo() const; + virtual const HttpResponseInfo* GetResponseInfo() const; virtual int ReadResponseBody(IOBuffer* buf, int buf_len, CompletionCallback* callback); diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 7b2f944..05c32f2 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -18,6 +18,7 @@ #include "base/string_number_conversions.h" #include "build/build_config.h" #include "googleurl/src/gurl.h" +#include "net/base/auth.h" #include "net/base/connection_type_histograms.h" #include "net/base/host_mapping_rules.h" #include "net/base/io_buffer.h" diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index b5919e6..dc7c842 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -13,6 +13,7 @@ #include "base/file_util.h" #include "base/scoped_ptr.h" #include "base/utf_string_conversions.h" +#include "net/base/auth.h" #include "net/base/capturing_net_log.h" #include "net/base/completion_callback.h" #include "net/base/mock_host_resolver.h" diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc index 1c76c36..aa58cfb 100644 --- a/net/http/http_proxy_client_socket.cc +++ b/net/http/http_proxy_client_socket.cc @@ -6,6 +6,7 @@ #include "base/string_util.h" #include "googleurl/src/gurl.h" +#include "net/base/auth.h" #include "net/base/host_port_pair.h" #include "net/base/io_buffer.h" #include "net/base/net_log.h" diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc index 29379c1..c534967 100644 --- a/net/http/http_request_headers.cc +++ b/net/http/http_request_headers.cc @@ -30,6 +30,15 @@ const char HttpRequestHeaders::kRange[] = "Range"; const char HttpRequestHeaders::kReferer[] = "Referer"; const char HttpRequestHeaders::kUserAgent[] = "User-Agent"; +HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair() { +} + +HttpRequestHeaders::HeaderKeyValuePair::HeaderKeyValuePair( + const base::StringPiece& key, const base::StringPiece& value) + : key(key.data(), key.size()), value(value.data(), value.size()) { +} + + HttpRequestHeaders::Iterator::Iterator(const HttpRequestHeaders& headers) : started_(false), curr_(headers.headers_.begin()), diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h index 9563fa265..734194a 100644 --- a/net/http/http_request_headers.h +++ b/net/http/http_request_headers.h @@ -21,10 +21,9 @@ namespace net { class HttpRequestHeaders { public: struct HeaderKeyValuePair { - HeaderKeyValuePair() {} + HeaderKeyValuePair(); HeaderKeyValuePair(const base::StringPiece& key, - const base::StringPiece& value) - : key(key.data(), key.size()), value(value.data(), value.size()) {} + const base::StringPiece& value); std::string key; std::string value; diff --git a/net/http/http_response_info.cc b/net/http/http_response_info.cc index 0159caf..3e1075b 100644 --- a/net/http/http_response_info.cc +++ b/net/http/http_response_info.cc @@ -7,6 +7,10 @@ #include "base/logging.h" #include "base/pickle.h" #include "base/time.h" +#include "net/base/auth.h" +#include "net/base/io_buffer.h" +#include "net/base/net_errors.h" +#include "net/base/ssl_cert_request_info.h" #include "net/http/http_response_headers.h" using base::Time; @@ -63,9 +67,40 @@ HttpResponseInfo::HttpResponseInfo() was_fetched_via_proxy(false) { } +HttpResponseInfo::HttpResponseInfo(const HttpResponseInfo& rhs) + : was_cached(rhs.was_cached), + was_fetched_via_spdy(rhs.was_fetched_via_spdy), + was_npn_negotiated(rhs.was_npn_negotiated), + was_fetched_via_proxy(rhs.was_fetched_via_proxy), + request_time(rhs.request_time), + response_time(rhs.response_time), + auth_challenge(rhs.auth_challenge), + cert_request_info(rhs.cert_request_info), + ssl_info(rhs.ssl_info), + headers(rhs.headers), + vary_data(rhs.vary_data), + metadata(rhs.metadata) { +} + HttpResponseInfo::~HttpResponseInfo() { } +HttpResponseInfo& HttpResponseInfo::operator=(const HttpResponseInfo& rhs) { + was_cached = rhs.was_cached; + was_fetched_via_spdy = rhs.was_fetched_via_spdy; + was_npn_negotiated = rhs.was_npn_negotiated; + was_fetched_via_proxy = rhs.was_fetched_via_proxy; + request_time = rhs.request_time; + response_time = rhs.response_time; + auth_challenge = rhs.auth_challenge; + cert_request_info = rhs.cert_request_info; + ssl_info = rhs.ssl_info; + headers = rhs.headers; + vary_data = rhs.vary_data; + metadata = rhs.metadata; + return *this; +} + bool HttpResponseInfo::InitFromPickle(const Pickle& pickle, bool* response_truncated) { void* iter = NULL; diff --git a/net/http/http_response_info.h b/net/http/http_response_info.h index 52db066..cd66982 100644 --- a/net/http/http_response_info.h +++ b/net/http/http_response_info.h @@ -7,22 +7,26 @@ #pragma once #include "base/time.h" -#include "net/base/auth.h" -#include "net/base/io_buffer.h" -#include "net/base/ssl_cert_request_info.h" #include "net/base/ssl_info.h" -#include "net/http/http_response_headers.h" #include "net/http/http_vary_data.h" class Pickle; namespace net { +class AuthChallengeInfo; +class HttpResponseHeaders; +class IOBufferWithSize; +class SSLCertRequestInfo; + class HttpResponseInfo { public: HttpResponseInfo(); + HttpResponseInfo(const HttpResponseInfo& rhs); ~HttpResponseInfo(); - // Default copy-constructor and assignment operator are OK! + HttpResponseInfo& operator=(const HttpResponseInfo& rhs); + // Even though we could get away with the copy ctor and default operator=, + // that would prevent us from doing a bunch of forward declaration. // The following is only defined if the request_time member is set. // If this response was resurrected from cache, then this bool is set, and diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index 9e0c8ba..68f98b9 100644 --- a/net/http/http_stream_parser.cc +++ b/net/http/http_stream_parser.cc @@ -6,10 +6,13 @@ #include "base/compiler_specific.h" #include "base/histogram.h" +#include "net/base/auth.h" #include "net/base/io_buffer.h" +#include "net/base/ssl_cert_request_info.h" #include "net/http/http_request_info.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" +#include "net/socket/client_socket_handle.h" namespace net { diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h index a658ce7..feb34e2 100644 --- a/net/http/http_stream_parser.h +++ b/net/http/http_stream_parser.h @@ -9,17 +9,18 @@ #include <string> #include "base/basictypes.h" -#include "net/base/io_buffer.h" #include "net/base/net_log.h" #include "net/base/upload_data_stream.h" #include "net/http/http_chunked_decoder.h" -#include "net/http/http_response_info.h" -#include "net/socket/client_socket_handle.h" namespace net { class ClientSocketHandle; +class DrainableIOBuffer; +class GrowableIOBuffer; struct HttpRequestInfo; +class HttpResponseInfo; +class IOBuffer; class HttpStreamParser { public: diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc index 6ca6477..6351562 100644 --- a/net/socket/client_socket_pool_base_unittest.cc +++ b/net/socket/client_socket_pool_base_unittest.cc @@ -17,6 +17,7 @@ #include "net/base/net_errors.h" #include "net/base/request_priority.h" #include "net/base/test_completion_callback.h" +#include "net/http/http_response_headers.h" #include "net/socket/client_socket.h" #include "net/socket/client_socket_factory.h" #include "net/socket/client_socket_handle.h" diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc index 531c836..059354e 100644 --- a/net/socket/ssl_client_socket_pool.cc +++ b/net/socket/ssl_client_socket_pool.cc @@ -5,6 +5,7 @@ #include "net/socket/ssl_client_socket_pool.h" #include "net/base/net_errors.h" +#include "net/base/ssl_cert_request_info.h" #include "net/http/http_proxy_client_socket.h" #include "net/http/http_proxy_client_socket_pool.h" #include "net/socket/client_socket_factory.h" diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc index db1ac87..d8e2093 100644 --- a/net/socket_stream/socket_stream_unittest.cc +++ b/net/socket_stream/socket_stream_unittest.cc @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/utf_string_conversions.h" +#include "net/base/auth.h" #include "net/base/mock_host_resolver.h" #include "net/base/net_log.h" #include "net/base/net_log_unittest.h" diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc index 5cde9ed..1b284bc 100644 --- a/net/spdy/spdy_http_stream.cc +++ b/net/spdy/spdy_http_stream.cc @@ -15,6 +15,7 @@ #include "net/base/load_flags.h" #include "net/base/net_util.h" #include "net/http/http_request_info.h" +#include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" #include "net/http/http_util.h" #include "net/spdy/spdy_session.h" diff --git a/net/websockets/websocket_handshake_handler.cc b/net/websockets/websocket_handshake_handler.cc index 5278151..a39fa58 100644 --- a/net/websockets/websocket_handshake_handler.cc +++ b/net/websockets/websocket_handshake_handler.cc @@ -8,6 +8,7 @@ #include "base/string_piece.h" #include "base/string_util.h" #include "googleurl/src/gurl.h" +#include "net/http/http_response_headers.h" #include "net/http/http_util.h" namespace { diff --git a/net/websockets/websocket_handshake_handler_unittest.cc b/net/websockets/websocket_handshake_handler_unittest.cc index 65e0712..fafd77e 100644 --- a/net/websockets/websocket_handshake_handler_unittest.cc +++ b/net/websockets/websocket_handshake_handler_unittest.cc @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/string_util.h" #include "googleurl/src/gurl.h" +#include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/websockets/websocket_handshake_handler.h" diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc index b91e496..bef5b4d0 100644 --- a/webkit/appcache/appcache_response_unittest.cc +++ b/webkit/appcache/appcache_response_unittest.cc @@ -12,6 +12,7 @@ #include "base/waitable_event.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" +#include "net/http/http_response_headers.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/appcache/appcache_response.h" #include "webkit/appcache/mock_appcache_service.h" diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc index f22b23e..4aa9328 100644 --- a/webkit/appcache/appcache_update_job.cc +++ b/webkit/appcache/appcache_update_job.cc @@ -11,6 +11,7 @@ #include "net/base/load_flags.h" #include "net/base/net_errors.h" #include "net/http/http_request_headers.h" +#include "net/http/http_response_headers.h" #include "webkit/appcache/appcache_group.h" #include "webkit/appcache/appcache_policy.h" diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc index 693d8f6..75141b9 100644 --- a/webkit/appcache/appcache_update_job_unittest.cc +++ b/webkit/appcache/appcache_update_job_unittest.cc @@ -8,6 +8,7 @@ #include "base/thread.h" #include "base/waitable_event.h" #include "net/base/net_errors.h" +#include "net/http/http_response_headers.h" #include "net/url_request/url_request_error_job.h" #include "net/url_request/url_request_test_job.h" #include "net/url_request/url_request_unittest.h" diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc index 76a6663..b4be06a 100644 --- a/webkit/appcache/appcache_url_request_job.cc +++ b/webkit/appcache/appcache_url_request_job.cc @@ -11,6 +11,7 @@ #include "net/base/net_errors.h" #include "net/base/net_log.h" #include "net/http/http_request_headers.h" +#include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_status.h" diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc index 44413ad..f3a3ed2 100644 --- a/webkit/appcache/appcache_url_request_job_unittest.cc +++ b/webkit/appcache/appcache_url_request_job_unittest.cc @@ -10,6 +10,7 @@ #include "base/thread.h" #include "base/waitable_event.h" #include "net/base/net_errors.h" +#include "net/http/http_response_headers.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_error_job.h" #include "net/base/io_buffer.h" |