Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: content/browser/frame_host/interstitial_page_navigator_impl.cc

Issue 2689653003: PlzNavigate: Enforce 'form-action' CSP on the browser-side. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/interstitial_page_navigator_impl.h" 5 #include "content/browser/frame_host/interstitial_page_navigator_impl.h"
6 6
7 #include "content/browser/frame_host/interstitial_page_impl.h" 7 #include "content/browser/frame_host/interstitial_page_impl.h"
8 #include "content/browser/frame_host/navigation_controller_impl.h" 8 #include "content/browser/frame_host/navigation_controller_impl.h"
9 #include "content/browser/frame_host/navigator_delegate.h" 9 #include "content/browser/frame_host/navigator_delegate.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 18 matching lines...) Expand all
29 29
30 void InterstitialPageNavigatorImpl::DidStartProvisionalLoad( 30 void InterstitialPageNavigatorImpl::DidStartProvisionalLoad(
31 RenderFrameHostImpl* render_frame_host, 31 RenderFrameHostImpl* render_frame_host,
32 const GURL& url, 32 const GURL& url,
33 const std::vector<GURL>& redirect_chain, 33 const std::vector<GURL>& redirect_chain,
34 const base::TimeTicks& navigation_start) { 34 const base::TimeTicks& navigation_start) {
35 // The interstitial page should only navigate once. 35 // The interstitial page should only navigate once.
36 DCHECK(!render_frame_host->navigation_handle()); 36 DCHECK(!render_frame_host->navigation_handle());
37 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create( 37 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create(
38 url, redirect_chain, render_frame_host->frame_tree_node(), 38 url, redirect_chain, render_frame_host->frame_tree_node(),
39 false, /* is_renderer_initiated */ 39 false, /* is_renderer_initiated */
40 false, /* is_synchronous */ 40 false, /* is_synchronous */
41 navigation_start, /* navigation_state */ 41 navigation_start, /* navigation_state */
42 0, /* pending_nav_entry_id */ 42 0, /* pending_nav_entry_id */
43 false, /* started_in_context_menu */ 43 false, /* started_in_context_menu */
44 CSPDisposition::CHECK /* should_check_main_world_csp */ 44 CSPDisposition::CHECK, /* should_check_main_world_csp */
45 false /* is_form_submission */
45 )); 46 ));
46 } 47 }
47 48
48 void InterstitialPageNavigatorImpl::DidNavigate( 49 void InterstitialPageNavigatorImpl::DidNavigate(
49 RenderFrameHostImpl* render_frame_host, 50 RenderFrameHostImpl* render_frame_host,
50 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params, 51 const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params,
51 std::unique_ptr<NavigationHandleImpl> navigation_handle) { 52 std::unique_ptr<NavigationHandleImpl> navigation_handle) {
52 navigation_handle->DidCommitNavigation( 53 navigation_handle->DidCommitNavigation(
53 input_params, true, false, GURL(), NAVIGATION_TYPE_NEW_PAGE, 54 input_params, true, false, GURL(), NAVIGATION_TYPE_NEW_PAGE,
54 render_frame_host); 55 render_frame_host);
55 navigation_handle.reset(); 56 navigation_handle.reset();
56 57
57 // TODO(nasko): Move implementation here, but for the time being call out 58 // TODO(nasko): Move implementation here, but for the time being call out
58 // to the interstitial page code. 59 // to the interstitial page code.
59 interstitial_->DidNavigate(render_frame_host->render_view_host(), 60 interstitial_->DidNavigate(render_frame_host->render_view_host(),
60 input_params); 61 input_params);
61 } 62 }
62 63
63 } // namespace content 64 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698