diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-11-22 12:53:17 +0100 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2023-11-24 19:04:01 +0100 |
commit | 52b8939c3c6a23761b62b46b13ee4e254452ec66 (patch) | |
tree | 10de6350997cb2cbd156c57cff48f619e9469bd8 /src/core/web_contents_adapter.cpp | |
parent | f3322daf3782edf7204c1ee7fd6dbeacfa369430 (diff) |
Remove TODO and FIXME from history restoration code
Granting renderer access here doesn't seems to be necessary anymore,
because similar code parts were removed from Chromium due to redundancy.
https://bugs.chromium.org/p/chromium/issues/detail?id=767519
Change-Id: I03606c9c559b4d46e14383172d79b221316de851
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index fe30206ce..95dd7e548 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -39,7 +39,6 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/text_input_manager.h" #include "content/browser/web_contents/web_contents_impl.h" -#include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/download_request_utils.h" @@ -280,7 +279,7 @@ static void deserializeNavigationHistory(QDataStream &input, int *currentIndex, int count; input >> count >> *currentIndex; - std::unique_ptr<content::NavigationEntryRestoreContext> context = content::NavigationEntryRestoreContext::Create(); // FIXME? + std::unique_ptr<content::NavigationEntryRestoreContext> context = content::NavigationEntryRestoreContext::Create(); entries->reserve(count); // Logic taken from SerializedNavigationEntry::ReadFromPickle and ToNavigationEntries. @@ -408,17 +407,6 @@ QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavig content::NavigationController &controller = newWebContents->GetController(); controller.Restore(currentIndex, content::RestoreType::kRestored, &entries); - if (controller.GetActiveEntry()) { - // 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 = newWebContents->GetPrimaryMainFrame()->GetProcess()->GetID(); - const blink::PageState& pageState = controller.GetActiveEntry()->GetPageState(); - const std::vector<base::FilePath>& filePaths = pageState.GetReferencedFiles(); - for (std::vector<base::FilePath>::const_iterator file = filePaths.begin(); file != filePaths.end(); ++file) - content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id, *file); - } - return QSharedPointer<WebContentsAdapter>::create(std::move(newWebContents)); } |