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

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

Issue 1250002: Report unreadable files as size zero when uploading. (Closed)
Patch Set: Address comments Created 10 years, 9 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 | « base/file_util.h ('k') | chrome/common/common_param_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_dispatcher_host.cc
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 143d9690acb98091eb82b9c9e6277caed2f2df8d..7576926df727ea1043c1e685cb08ce618e0349d7 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -132,10 +132,10 @@ bool ShouldServiceRequest(ChildProcessInfo::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<net::UploadData::Element>* uploads =
request_data.upload_data->elements();
std::vector<net::UploadData::Element>::const_iterator iter;
- for (iter = uploads.begin(); iter != uploads.end(); ++iter) {
+ for (iter = uploads->begin(); iter != uploads->end(); ++iter) {
if (iter->type() == net::UploadData::TYPE_FILE &&
!policy->CanUploadFile(child_id, iter->file_path())) {
NOTREACHED() << "Denied unauthorized upload of "
« no previous file with comments | « base/file_util.h ('k') | chrome/common/common_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698