OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/form_submission_throttle.h" | 5 #include "content/browser/frame_host/form_submission_throttle.h" |
6 #include "content/browser/frame_host/navigation_handle_impl.h" | 6 #include "content/browser/frame_host/navigation_handle_impl.h" |
7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
8 #include "content/public/browser/navigation_handle.h" | 8 #include "content/public/browser/navigation_handle.h" |
9 #include "content/public/browser/navigation_throttle.h" | 9 #include "content/public/browser/navigation_throttle.h" |
10 #include "content/public/common/browser_side_navigation_policy.h" | 10 #include "content/public/common/browser_side_navigation_policy.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 NavigationHandleImpl* handle = | 49 NavigationHandleImpl* handle = |
50 static_cast<NavigationHandleImpl*>(navigation_handle()); | 50 static_cast<NavigationHandleImpl*>(navigation_handle()); |
51 | 51 |
52 if (handle->should_check_main_world_csp() == CSPDisposition::DO_NOT_CHECK) | 52 if (handle->should_check_main_world_csp() == CSPDisposition::DO_NOT_CHECK) |
53 return NavigationThrottle::PROCEED; | 53 return NavigationThrottle::PROCEED; |
54 | 54 |
55 const GURL& url = handle->GetURL(); | 55 const GURL& url = handle->GetURL(); |
56 RenderFrameHostImpl* render_frame = | 56 RenderFrameHostImpl* render_frame = |
57 handle->frame_tree_node()->current_frame_host(); | 57 handle->frame_tree_node()->current_frame_host(); |
58 | 58 |
59 if (render_frame->IsAllowedByCsp(CSPDirective::FormAction, url, is_redirect)) | 59 if (render_frame->IsAllowedByCsp(CSPDirective::FormAction, url, is_redirect, |
| 60 handle->source_location())) { |
60 return NavigationThrottle::PROCEED; | 61 return NavigationThrottle::PROCEED; |
| 62 } |
61 | 63 |
62 return NavigationThrottle::CANCEL; | 64 return NavigationThrottle::CANCEL; |
63 } | 65 } |
64 | 66 |
65 } // namespace content | 67 } // namespace content |
OLD | NEW |