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

Unified Diff: net/http/http_network_transaction.cc

Issue 9350060: net: Make UploadDataStream::Init() asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « net/base/upload_data_stream_unittest.cc ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index f0595baa0d753d032582fb8aee8858ca788463d4..d7ca1dc36d13490b78b0029c5a6b3ff3c33e1c54 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -19,6 +19,7 @@
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "googleurl/src/gurl.h"
#include "net/base/auth.h"
@@ -733,7 +734,9 @@ int HttpNetworkTransaction::DoBuildRequest() {
request_body_.reset(NULL);
if (request_->upload_data) {
request_body_.reset(new UploadDataStream(request_->upload_data));
- const int error_code = request_body_->Init();
+ // InitSync() performs file IO. crbug.com/113669.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ const int error_code = request_body_->InitSync();
if (error_code != OK) {
request_body_.reset(NULL);
return error_code;
« no previous file with comments | « net/base/upload_data_stream_unittest.cc ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698