| Index: content/browser/frame_host/render_frame_host_impl.cc
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
|
| index d54b02b2e93dc888640494649d1c8ad802b3f729..ee82e33f195490207548a25f0733bc6e57927de6 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.cc
|
| +++ b/content/browser/frame_host/render_frame_host_impl.cc
|
| @@ -459,6 +459,7 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
|
| IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad,
|
| OnDidCommitProvisionalLoad(msg))
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_DidDropNavigation, OnDidDropNavigation)
|
| + IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateState, OnUpdateState)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
|
| IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted,
|
| OnDocumentOnLoadCompleted)
|
| @@ -973,6 +974,21 @@ void RenderFrameHostImpl::OnDidDropNavigation() {
|
| navigation_handle_.reset();
|
| }
|
|
|
| +void RenderFrameHostImpl::OnUpdateState(const PageState& state) {
|
| + // TODO(creis): Verify the state's ISN matches the last committed FNE.
|
| +
|
| + // Without this check, the renderer can trick the browser into using
|
| + // filenames it can't access in a future session restore.
|
| + // TODO(creis): Move CanAccessFilesOfPageState to RenderFrameHostImpl.
|
| + if (!render_view_host_->CanAccessFilesOfPageState(state)) {
|
| + bad_message::ReceivedBadMessage(
|
| + GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE);
|
| + return;
|
| + }
|
| +
|
| + delegate_->UpdateStateForFrame(this, state);
|
| +}
|
| +
|
| RenderWidgetHostImpl* RenderFrameHostImpl::GetRenderWidgetHost() {
|
| return render_widget_host_;
|
| }
|
|
|