Index: net/base/upload_data_stream.cc |
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc |
index 937ee094336da3a9f92f2a9422c9485cf6c17182..4962eb77f21768eeca3e89de13e487d1e1e4d00b 100644 |
--- a/net/base/upload_data_stream.cc |
+++ b/net/base/upload_data_stream.cc |
@@ -31,7 +31,7 @@ UploadDataStream::~UploadDataStream() { |
int UploadDataStream::Init() { |
DCHECK(!initialized_successfully_); |
- total_size_ = upload_data_->GetContentLength(); |
+ total_size_ = upload_data_->GetContentLengthSyncHack(); |
// If the underlying file has been changed and the expected file |
// modification time is set, treat it as error. Note that the expected |
@@ -98,6 +98,8 @@ int UploadDataStream::Read(IOBuffer* buf, int buf_len) { |
// Open the file of the current element if not yet opened. |
if (!element_file_stream_.get()) { |
element_file_bytes_remaining_ = element.GetContentLength(); |
+ // Temporarily allow until fix: http://crbug.com/72001. |
+ base::ThreadRestrictions::ScopedAllowIO allow_io; |
element_file_stream_.reset(element.NewFileStreamForReading()); |
} |