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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host.cc

Issue 9321003: net: Make UploadData::GetContentLength() asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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 | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/resource_dispatcher_host.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index b925a8563fadf673bf774e5b078223c4c3fd6318..635cbefec8fa395fac5a2fddde97eea463b09a59 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -21,6 +21,7 @@
#include "base/shared_memory.h"
#include "base/stl_util.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "base/threading/thread_restrictions.h"
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/cert_store.h"
#include "content/browser/child_process_security_policy_impl.h"
@@ -647,7 +648,8 @@ void ResourceDispatcherHost::BeginRequest(
if (request_data.upload_data) {
request->set_upload(request_data.upload_data);
// This results in performing file IO. crbug.com/112607.
- upload_size = request_data.upload_data->GetContentLength();
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ upload_size = request_data.upload_data->GetContentLengthSync();
}
// Install a CrossSiteResourceHandler if this request is coming from a
« no previous file with comments | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698