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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Add the TODO and bug ids that was forgotten. Created 3 years, 10 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/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "content/browser/renderer_host/render_view_host_impl.h" 52 #include "content/browser/renderer_host/render_view_host_impl.h"
53 #include "content/browser/renderer_host/render_widget_host_delegate.h" 53 #include "content/browser/renderer_host/render_widget_host_delegate.h"
54 #include "content/browser/renderer_host/render_widget_host_impl.h" 54 #include "content/browser/renderer_host/render_widget_host_impl.h"
55 #include "content/browser/renderer_host/render_widget_host_view_base.h" 55 #include "content/browser/renderer_host/render_widget_host_view_base.h"
56 #include "content/browser/shared_worker/shared_worker_service_impl.h" 56 #include "content/browser/shared_worker/shared_worker_service_impl.h"
57 #include "content/browser/websockets/websocket_manager.h" 57 #include "content/browser/websockets/websocket_manager.h"
58 #include "content/browser/webui/web_ui_controller_factory_registry.h" 58 #include "content/browser/webui/web_ui_controller_factory_registry.h"
59 #include "content/common/accessibility_messages.h" 59 #include "content/common/accessibility_messages.h"
60 #include "content/common/associated_interface_provider_impl.h" 60 #include "content/common/associated_interface_provider_impl.h"
61 #include "content/common/associated_interfaces.mojom.h" 61 #include "content/common/associated_interfaces.mojom.h"
62 #include "content/common/content_security_policy/content_security_policy.h"
62 #include "content/common/frame_messages.h" 63 #include "content/common/frame_messages.h"
63 #include "content/common/frame_owner_properties.h" 64 #include "content/common/frame_owner_properties.h"
64 #include "content/common/input_messages.h" 65 #include "content/common/input_messages.h"
65 #include "content/common/inter_process_time_ticks_converter.h" 66 #include "content/common/inter_process_time_ticks_converter.h"
66 #include "content/common/navigation_params.h" 67 #include "content/common/navigation_params.h"
67 #include "content/common/render_message_filter.mojom.h" 68 #include "content/common/render_message_filter.mojom.h"
68 #include "content/common/renderer.mojom.h" 69 #include "content/common/renderer.mojom.h"
69 #include "content/common/site_isolation_policy.h" 70 #include "content/common/site_isolation_policy.h"
70 #include "content/common/swapped_out_messages.h" 71 #include "content/common/swapped_out_messages.h"
71 #include "content/public/browser/ax_event_notification_details.h" 72 #include "content/public/browser/ax_event_notification_details.h"
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 } 1835 }
1835 1836
1836 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( 1837 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader(
1837 const ParsedFeaturePolicyHeader& parsed_header) { 1838 const ParsedFeaturePolicyHeader& parsed_header) {
1838 frame_tree_node()->SetFeaturePolicyHeader(parsed_header); 1839 frame_tree_node()->SetFeaturePolicyHeader(parsed_header);
1839 ResetFeaturePolicy(); 1840 ResetFeaturePolicy();
1840 feature_policy_->SetHeaderPolicy(parsed_header); 1841 feature_policy_->SetHeaderPolicy(parsed_header);
1841 } 1842 }
1842 1843
1843 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( 1844 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy(
1844 const ContentSecurityPolicyHeader& header) { 1845 const ContentSecurityPolicyHeader& header,
1845 frame_tree_node()->AddContentSecurityPolicy(header); 1846 const std::vector<ContentSecurityPolicy>& policies) {
1847 frame_tree_node()->AddContentSecurityPolicy(header, policies);
1846 } 1848 }
1847 1849
1848 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( 1850 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy(
1849 blink::WebInsecureRequestPolicy policy) { 1851 blink::WebInsecureRequestPolicy policy) {
1850 frame_tree_node()->SetInsecureRequestPolicy(policy); 1852 frame_tree_node()->SetInsecureRequestPolicy(policy);
1851 } 1853 }
1852 1854
1853 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( 1855 void RenderFrameHostImpl::OnUpdateToUniqueOrigin(
1854 bool is_potentially_trustworthy_unique_origin) { 1856 bool is_potentially_trustworthy_unique_origin) {
1855 url::Origin origin; 1857 url::Origin origin;
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 // There is no pending NavigationEntry in these cases, so pass 0 as the 3479 // There is no pending NavigationEntry in these cases, so pass 0 as the
3478 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3480 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3479 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3481 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3480 return NavigationHandleImpl::Create( 3482 return NavigationHandleImpl::Create(
3481 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3483 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3482 params.was_within_same_page, base::TimeTicks::Now(), 3484 params.was_within_same_page, base::TimeTicks::Now(),
3483 entry_id_for_data_nav, false); // started_from_context_menu 3485 entry_id_for_data_nav, false); // started_from_context_menu
3484 } 3486 }
3485 3487
3486 } // namespace content 3488 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/shared_worker/shared_worker_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698