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

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: Created 7 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: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index e9d9e2a7e5e5af0d0f25b1785afd7b889797b3b5..ee4cadb8a97733d9548576cc142a43171f9a5d50 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -1044,11 +1044,6 @@ 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 =
@@ -1056,7 +1051,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
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);
+ GrantReadFile(id, *file);
vandebo (ex-Chrome) 2013/06/27 22:35:17 nit: I think this will wrap at "id,"
Greg Billock 2013/06/28 18:40:33 Done.
}
if (schedule_load)

Powered by Google App Engine
This is Rietveld 408576698