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) { |