Android WebView duplicates the logic for granting renderer an access to read files when restoring navigation entries |
|||||
Issue description
RestoreFromPickle in android_webview/browser/state_serializer.cc has the following TODO:
// Set up the file access rights for the selected navigation entry.
// TODO(joth): This is duplicated from chrome/.../session_restore.cc and
// should be shared e.g. in NavigationController. http://crbug.com/68222
const int id = web_contents->GetRenderProcessHost()->GetID();
const content::PageState& page_state =
controller.GetLastCommittedEntry()->GetPageState();
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);
}
Let me use open this bug to track this TODO.
,
Sep 27 2017
,
Sep 27 2017
that section in session_restore.cc has been deleted in https://codereview.chromium.org/745053002 I wonder if this code is still needed.
,
Sep 28 2017
Great-- I mentioned in that CL that the session_restore.cc code had become redundant, so maybe we can remove this copy of it. Re comment #1: The list of referenced files is still something that needs to be updated for OOPIF support, since it's only tracked per page. That will require some changes to the serialization format. (I think there's some discussion of it in https://bugs.chromium.org/p/chromium/issues/detail?id=620261#c15.
,
Sep 30 2017
well, removing code is easy. let me do that :D https://chromium-review.googlesource.com/c/chromium/src/+/693576
,
Oct 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3bbeaeac4f9affd5fc6de68bae4f0c1e45765477 commit 3bbeaeac4f9affd5fc6de68bae4f0c1e45765477 Author: Bo Liu <boliu@chromium.org> Date: Mon Oct 02 19:01:14 2017 aw: Remove unneeded GrantReadFile file This has become obsolete awhile ago. See bug for details. Bug: 767519 Change-Id: I5895335f1fff232cb99e6b4e993051e71945ef41 Reviewed-on: https://chromium-review.googlesource.com/693576 Commit-Queue: Bo <boliu@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/heads/master@{#505707} [modify] https://crrev.com/3bbeaeac4f9affd5fc6de68bae4f0c1e45765477/android_webview/browser/state_serializer.cc
,
Oct 2 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by lukasza@chromium.org
, Sep 21 2017