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

Unified Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 10878082: net: Move file operation code from UploadData to UploadDataStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: _ 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
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy3_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy3_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698