OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1784 render_view_host_->delegate_->RendererUnresponsive(render_view_host_); | 1784 render_view_host_->delegate_->RendererUnresponsive(render_view_host_); |
1785 } | 1785 } |
1786 | 1786 |
1787 // PlzNavigate | 1787 // PlzNavigate |
1788 void RenderFrameHostImpl::CommitNavigation( | 1788 void RenderFrameHostImpl::CommitNavigation( |
1789 ResourceResponse* response, | 1789 ResourceResponse* response, |
1790 scoped_ptr<StreamHandle> body, | 1790 scoped_ptr<StreamHandle> body, |
1791 const CommonNavigationParams& common_params, | 1791 const CommonNavigationParams& common_params, |
1792 const RequestNavigationParams& request_params) { | 1792 const RequestNavigationParams& request_params) { |
1793 DCHECK((response && body.get()) || | 1793 DCHECK((response && body.get()) || |
1794 !NavigationRequest::ShouldMakeNetworkRequest(common_params.url)); | 1794 !ShouldMakeNetworkRequestForURL(common_params.url)); |
1795 UpdatePermissionsForNavigation(common_params, request_params); | 1795 UpdatePermissionsForNavigation(common_params, request_params); |
1796 | 1796 |
1797 // Get back to a clean state, in case we start a new navigation without | 1797 // Get back to a clean state, in case we start a new navigation without |
1798 // completing a RFH swap or unload handler. | 1798 // completing a RFH swap or unload handler. |
1799 SetState(RenderFrameHostImpl::STATE_DEFAULT); | 1799 SetState(RenderFrameHostImpl::STATE_DEFAULT); |
1800 | 1800 |
1801 const GURL body_url = body.get() ? body->GetURL() : GURL(); | 1801 const GURL body_url = body.get() ? body->GetURL() : GURL(); |
1802 const ResourceResponseHead head = response ? | 1802 const ResourceResponseHead head = response ? |
1803 response->head : ResourceResponseHead(); | 1803 response->head : ResourceResponseHead(); |
1804 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, | 1804 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, common_params, |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 // We may be returning to an existing NavigationEntry that had been granted | 2110 // We may be returning to an existing NavigationEntry that had been granted |
2111 // file access. If this is a different process, we will need to grant the | 2111 // file access. If this is a different process, we will need to grant the |
2112 // access again. The files listed in the page state are validated when they | 2112 // access again. The files listed in the page state are validated when they |
2113 // are received from the renderer to prevent abuse. | 2113 // are received from the renderer to prevent abuse. |
2114 if (request_params.page_state.IsValid()) { | 2114 if (request_params.page_state.IsValid()) { |
2115 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); | 2115 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); |
2116 } | 2116 } |
2117 } | 2117 } |
2118 | 2118 |
2119 } // namespace content | 2119 } // namespace content |
OLD | NEW |