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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 18129002: Update the child process security policy to use explicit permission grants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change RVH to use FileChooserParam mode Created 7 years, 5 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 | « chrome/browser/file_select_helper.cc ('k') | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index e9d9e2a7e5e5af0d0f25b1785afd7b889797b3b5..502b64a134474ed6b0c5956dc08757f8c089cc48 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -1044,19 +1044,14 @@ class SessionRestoreImpl : public content::NotificationObserver {
// Set up the file access rights for the selected navigation entry.
const int id = web_contents->GetRenderProcessHost()->GetID();
- const int read_file_permissions =
- base::PLATFORM_FILE_OPEN |
- base::PLATFORM_FILE_READ |
- base::PLATFORM_FILE_EXCLUSIVE_READ |
- base::PLATFORM_FILE_ASYNC;
const content::PageState& page_state =
tab.navigations.at(selected_index).page_state();
const std::vector<base::FilePath>& file_paths =
page_state.GetReferencedFiles();
for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
file != file_paths.end(); ++file) {
- content::ChildProcessSecurityPolicy::GetInstance()->
- GrantPermissionsForFile(id, *file, read_file_permissions);
+ content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id,
+ *file);
}
if (schedule_load)
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698