Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc |
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
index d233da6adbf53d7b87b69114c6393c265d70dc40..4698bf8f663833e2aa6e4ff505bec513959b356e 100644 |
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc |
@@ -53,7 +53,7 @@ |
#include "net/base/net_util.h" |
#include "net/base/network_delegate.h" |
#include "net/base/static_cookie_policy.h" |
-#include "net/base/upload_data.h" |
+#include "net/base/upload_data_stream.h" |
#include "net/cookies/cookie_store.h" |
#include "net/http/http_cache.h" |
#include "net/http/http_request_headers.h" |
@@ -618,9 +618,14 @@ class RequestProxy |
return; |
} |
- // GetContentLengthSync() may perform file IO, but it's ok here, as file |
+ // UploadDataStream::Init() may perform file IO, but it's ok here, as file |
// IO is not prohibited in IOThread defined in the file. |
- uint64 size = request_->get_upload_mutable()->GetContentLengthSync(); |
+ uint64 size = 0; |
+ { |
+ net::UploadDataStream stream(request_->get_upload_mutable()); |
hashimoto
2012/08/27 22:09:40
This filthy code here and in resource_dispatcher_h
|
+ if (stream.Init() == net::OK) |
+ size = stream.size(); |
+ } |
uint64 position = request_->GetUploadProgress(); |
if (position == last_upload_position_) |
return; // no progress made since last time |