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

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

Issue 745053002: Grant access to files in PageState, which have already been validated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting Created 6 years, 1 month 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 bac5d42bed83ff89c6dc02369a3ea889db74648f..08b5143f0e22e04752d97f5cab7c5b61f9f32af3 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -1082,19 +1082,6 @@ class SessionRestoreImpl : public content::NotificationObserver {
// focused tab will be loaded by Browser, and TabLoader will load the rest.
DCHECK(web_contents->GetController().NeedsReload());
- // Set up the file access rights for the selected navigation entry.
Charlie Reis 2014/11/25 21:00:55 This is now redundant with RenderFrameHostImpl::On
- const int id = web_contents->GetRenderProcessHost()->GetID();
- const content::PageState& page_state =
- content::PageState::CreateFromEncodedData(
- tab.navigations.at(selected_index).encoded_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()->GrantReadFile(id,
- *file);
- }
-
if (!is_selected_tab)
tab_loader_->ScheduleLoad(&web_contents->GetController());
return web_contents;
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | content/browser/web_contents/web_contents_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698