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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 2067493003: Moving (Can|Grant)AccessFilesOfPageState into RenderFrameHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@grant-file-access-after-transfer
Patch Set: Pulling in some changes that got removed from the dependent CL. 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/child_process_security_policy_impl.cc
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index d8e601cf5af1128ded767809cb83a9df80148c0c..5abcc8552827c1e9520049bee14f39a4ab812d9e 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/child_process_security_policy_impl.h"
+#include <algorithm>
#include <utility>
#include "base/command_line.h"
@@ -366,6 +367,15 @@ bool ChildProcessSecurityPolicyImpl::IsWebSafeScheme(
return ContainsKey(web_safe_schemes_, scheme);
}
+bool ChildProcessSecurityPolicyImpl::CanReadAllFiles(
Charlie Reis 2016/06/17 07:07:39 Nit: This is in the wrong section of the file. Th
Łukasz Anforowicz 2016/06/17 16:21:09 Done.
+ int child_id,
+ const std::vector<base::FilePath>& files) {
+ return std::all_of(files.begin(), files.end(),
+ [this, child_id](const base::FilePath& file) {
+ return CanReadFile(child_id, file);
+ });
+}
+
void ChildProcessSecurityPolicyImpl::RegisterPseudoScheme(
const std::string& scheme) {
base::AutoLock lock(lock_);
« no previous file with comments | « content/browser/child_process_security_policy_impl.h ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698