Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Unified Diff: net/http/http_network_transaction.cc

Issue 10825073: Stop using ScopedAllowIO in content::ResourceDispatcherHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chrome Frame fix Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index e825fb2e667e0c166deb32b07d883f6da9993344..8409ac16ad6d04f43715b0640ee72c6a42df05cc 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -46,6 +46,7 @@
#include "net/http/http_server_properties.h"
#include "net/http/http_status_code.h"
#include "net/http/http_stream_factory.h"
+#include "net/http/http_transaction_delegate.h"
#include "net/http/http_util.h"
#include "net/http/url_security_manager.h"
#include "net/socket/client_socket_factory.h"
@@ -122,7 +123,8 @@ HttpNetworkTransaction::HttpNetworkTransaction(HttpNetworkSession* session)
request_headers_(),
read_buf_len_(0),
next_state_(STATE_NONE),
- establishing_tunnel_(false) {
+ establishing_tunnel_(false),
+ delegate_(NULL) {
session->ssl_config_service()->GetSSLConfig(&server_ssl_config_);
if (session->http_stream_factory()->has_next_protos()) {
server_ssl_config_.next_protos =
@@ -748,7 +750,10 @@ int HttpNetworkTransaction::DoBuildRequest() {
if (request_->upload_data) {
request_body_.reset(new UploadDataStream(request_->upload_data));
const int error_code = request_body_->Init();
- if (error_code != OK) {
+ if (error_code == OK) {
+ if (delegate_)
+ delegate_->OnRequestBodyInitialized(request_body_->size());
+ } else {
request_body_.reset(NULL);
return error_code;
}

Powered by Google App Engine
This is Rietveld 408576698