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

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

Issue 2062523002: Fixing renderer's access to a file from HTTP POST (after a xsite transfer). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing Windows build. Created 4 years, 6 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 84d790eabf8db891f818da53fe9f0021fc594714..c1abb1831ea43140796f906e2eecb85bb1afbe7b 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1246,15 +1246,8 @@ void RenderViewHostImpl::OnFocusedNodeTouched(bool editable) {
bool RenderViewHostImpl::CanAccessFilesOfPageState(
const PageState& state) const {
- ChildProcessSecurityPolicyImpl* policy =
- ChildProcessSecurityPolicyImpl::GetInstance();
-
- const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles();
- for (const auto& file : file_paths) {
- if (!policy->CanReadFile(GetProcess()->GetID(), file))
- return false;
- }
- return true;
+ return ChildProcessSecurityPolicyImpl::GetInstance()->CanReadAllFiles(
+ GetProcess()->GetID(), state.GetReferencedFiles());
}
void RenderViewHostImpl::GrantFileAccessFromPageState(const PageState& state) {

Powered by Google App Engine
This is Rietveld 408576698