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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2697713005: DCHECK: Browser asking renderer to commit URLs it is not allowed to. (Closed)
Patch Set: git cl try 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 1448dd8939f48fe69578f4ecea6344312c1111fc..069f5b5d1fb9e89f780a74048084610515efd789 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2403,15 +2403,6 @@ void RenderFrameHostImpl::ResetWaitingState() {
render_view_host_->is_waiting_for_close_ack_ = false;
}
-bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
- // TODO(creis): We should also check for WebUI pages here. Also, when the
- // out-of-process iframes implementation is ready, we should check for
- // cross-site URLs that are not allowed to commit in this process.
-
- // Give the client a chance to disallow URLs from committing.
- return GetContentClient()->browser()->CanCommitURL(GetProcess(), url);
-}
-
bool RenderFrameHostImpl::CanCommitOrigin(
const url::Origin& origin,
const GURL& url) {
@@ -2912,6 +2903,15 @@ void RenderFrameHostImpl::ClearFocusedElement() {
Send(new FrameMsg_ClearFocusedElement(GetRoutingID()));
}
+bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
+ // TODO(creis): We should also check for WebUI pages here. Also, when the
+ // out-of-process iframes implementation is ready, we should check for
+ // cross-site URLs that are not allowed to commit in this process.
+
+ // Give the client a chance to disallow URLs from committing.
+ return GetContentClient()->browser()->CanCommitURL(GetProcess(), url);
+}
+
bool RenderFrameHostImpl::IsSameSiteInstance(
RenderFrameHostImpl* other_render_frame_host) {
// As a sanity check, make sure the frame belongs to the same BrowserContext.
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698