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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2557063002: Upgrade Insecure Requests: bugfixes, tests, and support for OOPIF.
Patch Set: Addressed comments (@nasko #2). Created 4 years 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/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('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 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 3130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 3141
3142 if (!committed_first_load_) 3142 if (!committed_first_load_)
3143 name_changed_before_first_commit_ = true; 3143 name_changed_before_first_commit_ = true;
3144 } 3144 }
3145 3145
3146 void RenderFrameImpl::didEnforceInsecureRequestPolicy( 3146 void RenderFrameImpl::didEnforceInsecureRequestPolicy(
3147 blink::WebInsecureRequestPolicy policy) { 3147 blink::WebInsecureRequestPolicy policy) {
3148 Send(new FrameHostMsg_EnforceInsecureRequestPolicy(routing_id_, policy)); 3148 Send(new FrameHostMsg_EnforceInsecureRequestPolicy(routing_id_, policy));
3149 } 3149 }
3150 3150
3151 void RenderFrameImpl::didEnforceInsecureNavigationsSet(
3152 const std::vector<uint32_t>& set) {
3153 Send(new FrameHostMsg_EnforceInsecureNavigationsSet(routing_id_, set));
3154 }
3155
3151 void RenderFrameImpl::didUpdateToUniqueOrigin( 3156 void RenderFrameImpl::didUpdateToUniqueOrigin(
3152 bool is_potentially_trustworthy_unique_origin) { 3157 bool is_potentially_trustworthy_unique_origin) {
3153 Send(new FrameHostMsg_UpdateToUniqueOrigin( 3158 Send(new FrameHostMsg_UpdateToUniqueOrigin(
3154 routing_id_, is_potentially_trustworthy_unique_origin)); 3159 routing_id_, is_potentially_trustworthy_unique_origin));
3155 } 3160 }
3156 3161
3157 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 3162 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
3158 blink::WebSandboxFlags flags) { 3163 blink::WebSandboxFlags flags) {
3159 Send(new FrameHostMsg_DidChangeSandboxFlags( 3164 Send(new FrameHostMsg_DidChangeSandboxFlags(
3160 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 3165 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
4782 params.render_view_routing_id = render_view_->routing_id(); 4787 params.render_view_routing_id = render_view_->routing_id();
4783 params.socket_address.set_host(response.remoteIPAddress().utf8()); 4788 params.socket_address.set_host(response.remoteIPAddress().utf8());
4784 params.socket_address.set_port(response.remotePort()); 4789 params.socket_address.set_port(response.remotePort());
4785 params.was_within_same_page = navigation_state->WasWithinSamePage(); 4790 params.was_within_same_page = navigation_state->WasWithinSamePage();
4786 4791
4787 // Set the origin of the frame. This will be replicated to the corresponding 4792 // Set the origin of the frame. This will be replicated to the corresponding
4788 // RenderFrameProxies in other processes. 4793 // RenderFrameProxies in other processes.
4789 params.origin = frame->document().getSecurityOrigin(); 4794 params.origin = frame->document().getSecurityOrigin();
4790 4795
4791 params.insecure_request_policy = frame->getInsecureRequestPolicy(); 4796 params.insecure_request_policy = frame->getInsecureRequestPolicy();
4797 params.insecure_navigations_set = frame->getInsecureRequestToUpgrade();
4792 4798
4793 params.has_potentially_trustworthy_unique_origin = 4799 params.has_potentially_trustworthy_unique_origin =
4794 frame->document().getSecurityOrigin().isUnique() && 4800 frame->document().getSecurityOrigin().isUnique() &&
4795 frame->document().getSecurityOrigin().isPotentiallyTrustworthy(); 4801 frame->document().getSecurityOrigin().isPotentiallyTrustworthy();
4796 4802
4797 // Set the URL to be displayed in the browser UI to the user. 4803 // Set the URL to be displayed in the browser UI to the user.
4798 params.url = GetLoadingUrl(); 4804 params.url = GetLoadingUrl();
4799 if (GURL(frame->document().baseURL()) != params.url) 4805 if (GURL(frame->document().baseURL()) != params.url)
4800 params.base_url = frame->document().baseURL(); 4806 params.base_url = frame->document().baseURL();
4801 4807
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
6696 // event target. Potentially a Pepper plugin will receive the event. 6702 // event target. Potentially a Pepper plugin will receive the event.
6697 // In order to tell whether a plugin gets the last mouse event and which it 6703 // In order to tell whether a plugin gets the last mouse event and which it
6698 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6704 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6699 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6705 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6700 // |pepper_last_mouse_event_target_|. 6706 // |pepper_last_mouse_event_target_|.
6701 pepper_last_mouse_event_target_ = nullptr; 6707 pepper_last_mouse_event_target_ = nullptr;
6702 #endif 6708 #endif
6703 } 6709 }
6704 6710
6705 } // namespace content 6711 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698