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

Side by Side Diff: content/public/browser/navigation_handle.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
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/public/test/navigation_simulator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/browser/navigation_handle.h" 5 #include "content/public/browser/navigation_handle.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/frame_host/navigation_handle_impl.h" 9 #include "content/browser/frame_host/navigation_handle_impl.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 17 matching lines...) Expand all
28 bool committed, 28 bool committed,
29 net::Error error, 29 net::Error error,
30 bool is_same_page) { 30 bool is_same_page) {
31 RenderFrameHostImpl* rfhi = 31 RenderFrameHostImpl* rfhi =
32 static_cast<RenderFrameHostImpl*>(render_frame_host); 32 static_cast<RenderFrameHostImpl*>(render_frame_host);
33 std::unique_ptr<NavigationHandleImpl> handle_impl = 33 std::unique_ptr<NavigationHandleImpl> handle_impl =
34 NavigationHandleImpl::Create( 34 NavigationHandleImpl::Create(
35 url, std::vector<GURL>(), rfhi->frame_tree_node(), 35 url, std::vector<GURL>(), rfhi->frame_tree_node(),
36 true, // is_renderer_initiated 36 true, // is_renderer_initiated
37 is_same_page, base::TimeTicks::Now(), 0, 37 is_same_page, base::TimeTicks::Now(), 0,
38 false, // started_from_context_menu 38 false, // started_from_context_menu
39 CSPDisposition::CHECK); // should_check_main_world_csp 39 CSPDisposition::CHECK, // should_check_main_world_csp
40 false); // is_form_submission
40 handle_impl->set_render_frame_host(rfhi); 41 handle_impl->set_render_frame_host(rfhi);
41 if (error != net::OK) 42 if (error != net::OK)
42 handle_impl->set_net_error_code(error); 43 handle_impl->set_net_error_code(error);
43 if (committed) 44 if (committed)
44 handle_impl->CallDidCommitNavigationForTesting(url); 45 handle_impl->CallDidCommitNavigationForTesting(url);
45 return std::unique_ptr<NavigationHandle>(std::move(handle_impl)); 46 return std::unique_ptr<NavigationHandle>(std::move(handle_impl));
46 } 47 }
47 48
48 } // namespace content 49 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/public/test/navigation_simulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698