diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 19:26:03 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 19:26:03 +0000 |
commit | 9a02ce35a50ff0c4a24121274652cf41a01a04b0 (patch) | |
tree | f0b33b9c7c505badd8fb64dc2394f1740cc748ac | |
parent | 5e76896c80016fb6aae4a00c2232276935008b9a (diff) | |
download | chromium_src-9a02ce35a50ff0c4a24121274652cf41a01a04b0.zip chromium_src-9a02ce35a50ff0c4a24121274652cf41a01a04b0.tar.gz chromium_src-9a02ce35a50ff0c4a24121274652cf41a01a04b0.tar.bz2 |
Remove the debugging instrumentation.
Review URL: http://codereview.chromium.org/9304
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4623 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/client_socket.h | 5 | ||||
-rw-r--r-- | net/base/ssl_client_socket.h | 5 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 59 | ||||
-rw-r--r-- | net/http/http_network_transaction.h | 3 |
4 files changed, 0 insertions, 72 deletions
diff --git a/net/base/client_socket.h b/net/base/client_socket.h index f2f39cd..97495dd 100644 --- a/net/base/client_socket.h +++ b/net/base/client_socket.h @@ -43,11 +43,6 @@ class ClientSocket : public Socket { // connection wasn't established or the connection is dead. virtual bool IsConnected() const = 0; - // TODO(eroman): Temporary for 3772 bug investigation. - virtual bool IsSSL() const { - return false; - } - #if defined(OS_LINUX) // Identical to posix system call getpeername(). // Needed by ssl_client_socket_nss. diff --git a/net/base/ssl_client_socket.h b/net/base/ssl_client_socket.h index 53412a5..dca5ef3 100644 --- a/net/base/ssl_client_socket.h +++ b/net/base/ssl_client_socket.h @@ -22,11 +22,6 @@ class SSLClientSocket : public ClientSocket { public: // Gets the SSL connection information of the socket. virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; - - // TODO(eroman): Temporary for 3772 bug investigation. - virtual bool IsSSL() const { - return true; - } }; } // namespace net diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index b25c884f..cad17af 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -30,9 +30,6 @@ using base::Time; -// TODO(eroman): Temporary 3772 bug investigation. -#define CRASH() *((int *)0xbbadbeef) = 0 - namespace net { //----------------------------------------------------------------------------- @@ -429,13 +426,6 @@ int HttpNetworkTransaction::DoInitConnectionComplete(int result) { // trying to reuse a keep-alive connection. reused_socket_ = (connection_.socket() != NULL); if (reused_socket_) { - DCHECK(!using_ssl_ || connection_.socket()->IsSSL()); - - // TODO(eroman): Temporary for 3772 bug investigation. - if (using_ssl_ && !connection_.socket()->IsSSL()) { - CRASH(); - } - next_state_ = STATE_WRITE_HEADERS; } else { next_state_ = STATE_RESOLVE_HOST; @@ -766,11 +756,6 @@ int HttpNetworkTransaction::DoReadBodyComplete(int result) { // Clean up the HttpConnection if we are done. if (done) { - // TODO(eroman): Temporary for 3772 bug investigation. - if (keep_alive && using_ssl_ && !connection_.socket()->IsSSL()) { - // It is invalid to be recycling a TCPClientSocket. - CrashFor3772(); - } if (!keep_alive) connection_.set_socket(NULL); connection_.Reset(); @@ -784,48 +769,6 @@ int HttpNetworkTransaction::DoReadBodyComplete(int result) { return result; } -// TODO(eroman): Temporary for 3772 bug investigation. -// --------------------------------------------------------------------------- -struct InfoFor3772 { - bool establishing_tunnel; - bool using_tunnel; - bool using_proxy; - bool reused_socket; - char url[256]; - int response_code; - int64 content_length; - HttpVersion parsed_http_version; - HttpVersion http_version; -}; - -static void KeepDataAlive(InfoFor3772* info) { - char* ptr = reinterpret_cast<char*>(info); - if (ptr == reinterpret_cast<char*>(11)) { - for (size_t i = 0; i < sizeof(InfoFor3772); ++i) - ptr[i] += 11; - } -} - -void HttpNetworkTransaction::CrashFor3772() { - // Copy some data onto the stack so it shows up in mini-dump. - InfoFor3772 info; - info.establishing_tunnel = establishing_tunnel_; - info.using_tunnel = using_tunnel_; - info.using_proxy = using_proxy_; - info.reused_socket = reused_socket_; - base::strlcpy(info.url, request_->url.spec().c_str(), 256); - info.response_code = response_.headers->response_code(); - info.content_length = response_.headers->GetContentLength(); - info.parsed_http_version = response_.headers->GetParsedHttpVersion(); - info.http_version = response_.headers->GetHttpVersion(); - - CRASH(); - - KeepDataAlive(&info); -} - -// --------------------------------------------------------------------------- - int HttpNetworkTransaction::DidReadResponseHeaders() { scoped_refptr<HttpResponseHeaders> headers; if (has_found_status_line_start()) { @@ -913,7 +856,6 @@ int HttpNetworkTransaction::DidReadResponseHeaders() { } if (using_ssl_ && !establishing_tunnel_) { - DCHECK(connection_.socket()->IsSSL()); SSLClientSocket* ssl_socket = reinterpret_cast<SSLClientSocket*>(connection_.socket()); ssl_socket->GetSSLInfo(&response_.ssl_info); @@ -947,7 +889,6 @@ int HttpNetworkTransaction::HandleCertificateError(int error) { } if (error != OK) { - DCHECK(connection_.socket()->IsSSL()); SSLClientSocket* ssl_socket = reinterpret_cast<SSLClientSocket*>(connection_.socket()); ssl_socket->GetSSLInfo(&response_.ssl_info); diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h index 1ba2a89..dc850b5 100644 --- a/net/http/http_network_transaction.h +++ b/net/http/http_network_transaction.h @@ -77,9 +77,6 @@ class HttpNetworkTransaction : public HttpTransaction { int DoReadBody(); int DoReadBodyComplete(int result); - // TODO(eroman): Temporary for 3772 bug investigation. - void CrashFor3772(); - // Called when header_buf_ contains the complete response headers. int DidReadResponseHeaders(); |