Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index c8493ed4bec5041202a240a1a6533ea8e1e2744e..c129515f95491ed898fef29075c8f5dc1caceb93 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -68,7 +68,6 @@ |
#include "ui/shell_dialogs/selected_file_info.h" |
#include "ui/snapshot/snapshot.h" |
#include "webkit/fileapi/isolated_context.h" |
-#include "webkit/glue/glue_serialize.h" |
#include "webkit/glue/webdropdata.h" |
#include "webkit/glue/webkit_glue.h" |
@@ -1235,7 +1234,7 @@ void RenderViewHostImpl::OnNavigate(const IPC::Message& msg) { |
// Without this check, the renderer can trick the browser into using |
// filenames it can't access in a future session restore. |
- if (!CanAccessFilesOfSerializedState(validated_params.content_state)) { |
+ if (!CanAccessFilesOfPageState(validated_params.page_state)) { |
GetProcess()->ReceivedBadMessage(); |
return; |
} |
@@ -1243,11 +1242,10 @@ void RenderViewHostImpl::OnNavigate(const IPC::Message& msg) { |
delegate_->DidNavigate(this, validated_params); |
} |
-void RenderViewHostImpl::OnUpdateState(int32 page_id, |
- const std::string& state) { |
+void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) { |
// Without this check, the renderer can trick the browser into using |
// filenames it can't access in a future session restore. |
- if (!CanAccessFilesOfSerializedState(state)) { |
+ if (!CanAccessFilesOfPageState(state)) { |
GetProcess()->ReceivedBadMessage(); |
return; |
} |
@@ -2074,12 +2072,12 @@ void RenderViewHostImpl::ClearPowerSaveBlockers() { |
STLDeleteValues(&power_save_blockers_); |
} |
-bool RenderViewHostImpl::CanAccessFilesOfSerializedState( |
- const std::string& state) const { |
+bool RenderViewHostImpl::CanAccessFilesOfPageState( |
+ const PageState& state) const { |
ChildProcessSecurityPolicyImpl* policy = |
ChildProcessSecurityPolicyImpl::GetInstance(); |
- const std::vector<base::FilePath>& file_paths = |
- webkit_glue::FilePathsFromHistoryState(state); |
+ |
+ const std::vector<base::FilePath>& file_paths = state.GetReferencedFiles(); |
for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); |
file != file_paths.end(); ++file) { |
if (!policy->CanReadFile(GetProcess()->GetID(), *file)) |