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

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 3431032: Change ChildProcessSecurityPolicy to store a list of allowed flags for... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return false; 146 return false;
147 } 147 }
148 148
149 // Check if the renderer is permitted to upload the requested files. 149 // Check if the renderer is permitted to upload the requested files.
150 if (request_data.upload_data) { 150 if (request_data.upload_data) {
151 const std::vector<net::UploadData::Element>* uploads = 151 const std::vector<net::UploadData::Element>* uploads =
152 request_data.upload_data->elements(); 152 request_data.upload_data->elements();
153 std::vector<net::UploadData::Element>::const_iterator iter; 153 std::vector<net::UploadData::Element>::const_iterator iter;
154 for (iter = uploads->begin(); iter != uploads->end(); ++iter) { 154 for (iter = uploads->begin(); iter != uploads->end(); ++iter) {
155 if (iter->type() == net::UploadData::TYPE_FILE && 155 if (iter->type() == net::UploadData::TYPE_FILE &&
156 !policy->CanUploadFile(child_id, iter->file_path())) { 156 !policy->CanReadFile(child_id, iter->file_path())) {
157 NOTREACHED() << "Denied unauthorized upload of " 157 NOTREACHED() << "Denied unauthorized upload of "
158 << iter->file_path().value(); 158 << iter->file_path().value();
159 return false; 159 return false;
160 } 160 }
161 } 161 }
162 } 162 }
163 163
164 return true; 164 return true;
165 } 165 }
166 166
(...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1881 return is_prefetch_enabled_; 1881 return is_prefetch_enabled_;
1882 } 1882 }
1883 1883
1884 // static 1884 // static
1885 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1885 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1886 is_prefetch_enabled_ = value; 1886 is_prefetch_enabled_ = value;
1887 } 1887 }
1888 1888
1889 // static 1889 // static
1890 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1890 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698