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

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

Issue 2758143002: Don't reset URL for CAN_COMMIT_URL_BLOCKED renderer kill. (Closed)
Patch Set: 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 | « no previous file | no next file » | 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/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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 base::TimeTicks::Now() - validated_params.ui_timestamp, 1214 base::TimeTicks::Now() - validated_params.ui_timestamp,
1215 base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromMinutes(10), 1215 base::TimeDelta::FromMilliseconds(10), base::TimeDelta::FromMinutes(10),
1216 100); 1216 100);
1217 } 1217 }
1218 1218
1219 // Attempts to commit certain off-limits URL should be caught more strictly 1219 // Attempts to commit certain off-limits URL should be caught more strictly
1220 // than our FilterURL checks below. If a renderer violates this policy, it 1220 // than our FilterURL checks below. If a renderer violates this policy, it
1221 // should be killed. 1221 // should be killed.
1222 if (!CanCommitURL(validated_params.url)) { 1222 if (!CanCommitURL(validated_params.url)) {
1223 VLOG(1) << "Blocked URL " << validated_params.url.spec(); 1223 VLOG(1) << "Blocked URL " << validated_params.url.spec();
1224 validated_params.url = GURL(url::kAboutBlankURL);
1225 // Kills the process. 1224 // Kills the process.
1226 bad_message::ReceivedBadMessage(process, 1225 bad_message::ReceivedBadMessage(process,
1227 bad_message::RFH_CAN_COMMIT_URL_BLOCKED); 1226 bad_message::RFH_CAN_COMMIT_URL_BLOCKED);
1227 validated_params.url = GURL(url::kAboutBlankURL);
nasko 2017/03/20 21:37:14 Doing some code archeology, it looks like we might
Charlie Reis 2017/03/21 18:32:11 Good call! Done.
1228 return; 1228 return;
1229 } 1229 }
1230 1230
1231 // Verify that the origin passed from the renderer process is valid and can 1231 // Verify that the origin passed from the renderer process is valid and can
1232 // be allowed to commit in this RenderFrameHost. 1232 // be allowed to commit in this RenderFrameHost.
1233 if (!CanCommitOrigin(validated_params.origin, validated_params.url)) { 1233 if (!CanCommitOrigin(validated_params.origin, validated_params.url)) {
1234 bad_message::ReceivedBadMessage(GetProcess(), 1234 bad_message::ReceivedBadMessage(GetProcess(),
1235 bad_message::RFH_INVALID_ORIGIN_ON_COMMIT); 1235 bad_message::RFH_INVALID_ORIGIN_ON_COMMIT);
1236 return; 1236 return;
1237 } 1237 }
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 GetUserData(kRenderFrameHostAndroidKey)); 3475 GetUserData(kRenderFrameHostAndroidKey));
3476 if (!render_frame_host_android) { 3476 if (!render_frame_host_android) {
3477 render_frame_host_android = new RenderFrameHostAndroid(this); 3477 render_frame_host_android = new RenderFrameHostAndroid(this);
3478 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); 3478 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android);
3479 } 3479 }
3480 return render_frame_host_android->GetJavaObject(); 3480 return render_frame_host_android->GetJavaObject();
3481 } 3481 }
3482 #endif 3482 #endif
3483 3483
3484 } // namespace content 3484 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698