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

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

Issue 10695107: Fix: file permissions when restoring a page with file inputs with selected files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | webkit/glue/glue_serialize.h » ('j') | webkit/glue/glue_serialize.cc » ('J')
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 98708651d0277a09c6280b2421149f3345f1250c..c1daf9bf4ef31c5999b7039232c2d35d7cda69bf 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -912,6 +912,14 @@ class SessionRestoreImpl : public content::NotificationObserver {
content::ChildProcessSecurityPolicy::GetInstance()->
GrantPermissionsForFile(id, *file, read_file_permissions);
}
+ // Set up file access rights for selected files in file inputs.
+ const std::vector<FilePath>& input_file_paths =
+ webkit_glue::FilePathsFromInputsInHistoryState(state);
+ for (std::vector<FilePath>::const_iterator file = input_file_paths.begin();
+ file != input_file_paths.end(); ++file) {
+ content::ChildProcessSecurityPolicy::GetInstance()->
+ GrantPermissionsForFile(id, *file, read_file_permissions);
+ }
if (schedule_load)
tab_loader_->ScheduleLoad(&web_contents->GetController());
« no previous file with comments | « no previous file | webkit/glue/glue_serialize.h » ('j') | webkit/glue/glue_serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698