diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 20:42:55 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-25 20:42:55 +0000 |
commit | 725355a29e53a5bc0f37237b9be5023a35e0c09e (patch) | |
tree | 89338fa14de0636689c57716f8ffe1485540d3ea /net/http | |
parent | 78c3a37c716807e8f50444da64d6506632e13669 (diff) | |
download | chromium_src-725355a29e53a5bc0f37237b9be5023a35e0c09e.zip chromium_src-725355a29e53a5bc0f37237b9be5023a35e0c09e.tar.gz chromium_src-725355a29e53a5bc0f37237b9be5023a35e0c09e.tar.bz2 |
Reverting 12479 which reverted 12470.
This change is the same as 12470, except with HttpRequestInfo::priority initialized in the initializer list, which should fix the purify errors.
Review URL: http://codereview.chromium.org/53066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_transaction.cc | 22 | ||||
-rw-r--r-- | net/http/http_request_info.h | 6 |
2 files changed, 16 insertions, 12 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index ae1d9fd..c7ea56f 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -377,7 +377,7 @@ int HttpNetworkTransaction::DoLoop(int result) { next_state_ = STATE_NONE; switch (state) { case STATE_RESOLVE_PROXY: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.resolve_proxy", request_, request_->url.spec()); rv = DoResolveProxy(); break; @@ -386,7 +386,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.resolve_proxy", request_, request_->url.spec()); break; case STATE_INIT_CONNECTION: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.init_conn", request_, request_->url.spec()); rv = DoInitConnection(); break; @@ -395,7 +395,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.init_conn", request_, request_->url.spec()); break; case STATE_RESOLVE_HOST: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.resolve_host", request_, request_->url.spec()); rv = DoResolveHost(); break; @@ -404,7 +404,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.resolve_host", request_, request_->url.spec()); break; case STATE_CONNECT: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.connect", request_, request_->url.spec()); rv = DoConnect(); break; @@ -413,7 +413,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.connect", request_, request_->url.spec()); break; case STATE_SSL_CONNECT_OVER_TUNNEL: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.ssl_tunnel", request_, request_->url.spec()); rv = DoSSLConnectOverTunnel(); break; @@ -422,7 +422,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.ssl_tunnel", request_, request_->url.spec()); break; case STATE_WRITE_HEADERS: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.write_headers", request_, request_->url.spec()); rv = DoWriteHeaders(); break; @@ -431,7 +431,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.write_headers", request_, request_->url.spec()); break; case STATE_WRITE_BODY: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.write_body", request_, request_->url.spec()); rv = DoWriteBody(); break; @@ -440,7 +440,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.write_body", request_, request_->url.spec()); break; case STATE_READ_HEADERS: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.read_headers", request_, request_->url.spec()); rv = DoReadHeaders(); break; @@ -449,7 +449,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.read_headers", request_, request_->url.spec()); break; case STATE_READ_BODY: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.read_body", request_, request_->url.spec()); rv = DoReadBody(); break; @@ -458,7 +458,7 @@ int HttpNetworkTransaction::DoLoop(int result) { TRACE_EVENT_END("http.read_body", request_, request_->url.spec()); break; case STATE_DRAIN_BODY_FOR_AUTH_RESTART: - DCHECK(rv == OK); + DCHECK_EQ(OK, rv); TRACE_EVENT_BEGIN("http.drain_body_for_auth_restart", request_, request_->url.spec()); rv = DoDrainBodyForAuthRestart(); @@ -527,7 +527,7 @@ int HttpNetworkTransaction::DoInitConnection() { connection_group.append(request_->url.GetOrigin().spec()); DCHECK(!connection_group.empty()); - return connection_.Init(connection_group, &io_callback_); + return connection_.Init(connection_group, request_->priority, &io_callback_); } int HttpNetworkTransaction::DoInitConnectionComplete(int result) { diff --git a/net/http/http_request_info.h b/net/http/http_request_info.h index de817fa..1382171 100644 --- a/net/http/http_request_info.h +++ b/net/http/http_request_info.h @@ -5,6 +5,7 @@ #ifndef NET_HTTP_HTTP_REQUEST_INFO_H__ #define NET_HTTP_HTTP_REQUEST_INFO_H__ +#include <string> #include "base/ref_counted.h" #include "googleurl/src/gurl.h" #include "net/base/upload_data.h" @@ -13,7 +14,7 @@ namespace net { class HttpRequestInfo { public: - HttpRequestInfo() : load_flags(0) { + HttpRequestInfo() : load_flags(0), priority(0) { } // The requested URL. @@ -37,6 +38,9 @@ class HttpRequestInfo { // Any load flags (see load_flags.h). int load_flags; + + // The priority level for this request. + int priority; }; } // namespace net |