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

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

Issue 2046733003: Replicate WebInsecureRequestPolicy instead of a bool for strict mixed content checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@securitycontext
Patch Set: alexmos@ Created 4 years, 6 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 545 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
546 OnRunJavaScriptMessage) 546 OnRunJavaScriptMessage)
547 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, 547 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
548 OnRunBeforeUnloadConfirm) 548 OnRunBeforeUnloadConfirm)
549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, 549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
550 OnDidAccessInitialDocument) 550 OnDidAccessInitialDocument)
551 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) 551 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
552 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) 552 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
553 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, 553 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy,
554 OnDidAddContentSecurityPolicy) 554 OnDidAddContentSecurityPolicy)
555 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, 555 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy,
556 OnEnforceStrictMixedContentChecking) 556 OnEnforceInsecureRequestPolicy)
557 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, 557 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin,
558 OnUpdateToUniqueOrigin) 558 OnUpdateToUniqueOrigin)
559 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) 559 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId)
560 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, 560 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags,
561 OnDidChangeSandboxFlags) 561 OnDidChangeSandboxFlags)
562 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, 562 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties,
563 OnDidChangeFrameOwnerProperties) 563 OnDidChangeFrameOwnerProperties)
564 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) 564 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
565 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) 565 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
566 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, 566 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 if (old_name.empty() && !name.empty()) 1549 if (old_name.empty() && !name.empty())
1550 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); 1550 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame();
1551 delegate_->DidChangeName(this, name); 1551 delegate_->DidChangeName(this, name);
1552 } 1552 }
1553 1553
1554 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( 1554 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy(
1555 const ContentSecurityPolicyHeader& header) { 1555 const ContentSecurityPolicyHeader& header) {
1556 frame_tree_node()->AddContentSecurityPolicy(header); 1556 frame_tree_node()->AddContentSecurityPolicy(header);
1557 } 1557 }
1558 1558
1559 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { 1559 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy(
1560 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); 1560 blink::WebInsecureRequestPolicy policy) {
1561 frame_tree_node()->SetInsecureRequestPolicy(policy);
1561 } 1562 }
1562 1563
1563 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( 1564 void RenderFrameHostImpl::OnUpdateToUniqueOrigin(
1564 bool is_potentially_trustworthy_unique_origin) { 1565 bool is_potentially_trustworthy_unique_origin) {
1565 url::Origin origin; 1566 url::Origin origin;
1566 DCHECK(origin.unique()); 1567 DCHECK(origin.unique());
1567 frame_tree_node()->SetCurrentOrigin(origin, 1568 frame_tree_node()->SetCurrentOrigin(origin,
1568 is_potentially_trustworthy_unique_origin); 1569 is_potentially_trustworthy_unique_origin);
1569 } 1570 }
1570 1571
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2859 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2859 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2860 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2860 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2861 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2861 } 2862 }
2862 2863
2863 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2864 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2864 web_bluetooth_service_.reset(); 2865 web_bluetooth_service_.reset();
2865 } 2866 }
2866 2867
2867 } // namespace content 2868 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698