| Index: content/browser/renderer_host/resource_dispatcher_host_impl.cc
|
| diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
|
| index 052e5ce9d52d6a8249849bdb17ec96617a296e13..511c70e11652fd11e38b5be9c6d7c02c3b958e40 100644
|
| --- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc
|
| +++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
|
| @@ -83,6 +83,7 @@
|
| #include "webkit/blob/blob_storage_controller.h"
|
| #include "webkit/blob/shareable_file_reference.h"
|
| #include "webkit/glue/webkit_glue.h"
|
| +#include "webkit/glue/webupload_data.h"
|
|
|
| using base::Time;
|
| using base::TimeDelta;
|
| @@ -172,11 +173,11 @@ bool ShouldServiceRequest(ProcessType process_type,
|
|
|
| // Check if the renderer is permitted to upload the requested files.
|
| if (request_data.upload_data) {
|
| - const std::vector<net::UploadData::Element>* uploads =
|
| + const std::vector<WebUploadData::Element>* uploads =
|
| request_data.upload_data->elements();
|
| - std::vector<net::UploadData::Element>::const_iterator iter;
|
| + std::vector<WebUploadData::Element>::const_iterator iter;
|
| for (iter = uploads->begin(); iter != uploads->end(); ++iter) {
|
| - if (iter->type() == net::UploadData::TYPE_FILE &&
|
| + if (iter->type() == WebUploadData::TYPE_FILE &&
|
| !policy->CanReadFile(child_id, iter->file_path())) {
|
| NOTREACHED() << "Denied unauthorized upload of "
|
| << iter->file_path().value();
|
| @@ -964,10 +965,12 @@ void ResourceDispatcherHostImpl::BeginRequest(
|
| // Set upload data.
|
| uint64 upload_size = 0;
|
| if (request_data.upload_data) {
|
| - request->set_upload(request_data.upload_data);
|
| + scoped_refptr<net::UploadData> upload = new net::UploadData;
|
| + request_data.upload_data->PopulateUploadData(upload.get());
|
| + request->set_upload(upload);
|
| // This results in performing file IO. crbug.com/112607.
|
| base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| - upload_size = request_data.upload_data->GetContentLengthSync();
|
| + upload_size = upload->GetContentLengthSync();
|
| }
|
|
|
| bool allow_download = request_data.allow_download &&
|
|
|