From 821825658763d672a40ff332753103108323dbaa Mon Sep 17 00:00:00 2001 From: "creis@chromium.org" Date: Fri, 9 Apr 2010 17:25:16 +0000 Subject: Revert 43962 - Adds a safety check for DOM UI renderers. (Currently crashing on reliability bot.) We should not be passing web URLs to DOM UI renderers. This CL adds a check to ensure that we only navigate to DOM UI URLs in such renderers. BUG=40575 TEST=none Review URL: http://codereview.chromium.org/1549027 TBR=brettw Review URL: http://codereview.chromium.org/1626012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44100 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/renderer_host/render_view_host.h | 4 ---- chrome/browser/tab_contents/tab_contents.cc | 7 ------- 2 files changed, 11 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 3492603..0601821 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -323,10 +323,6 @@ class RenderViewHost : public RenderWidgetHost { // should be a combination of values from BindingsPolicy. void AllowBindings(int binding_flags); - // Returns a bitwise OR of bindings types that have been enabled for this - // RenderView. See BindingsPolicy for details. - int enabled_bindings() { return enabled_bindings_; } - // Sets a property with the given name and value on the DOM UI binding object. // Must call AllowDOMUIBindings() on this renderer first. void SetDOMUIProperty(const std::string& name, const std::string& value); diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index e35ab19..27d67ec 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -64,7 +64,6 @@ #include "chrome/browser/tab_contents/thumbnail_generator.h" #include "chrome/browser/thumbnail_store.h" #include "chrome/browser/translate/page_translated_details.h" -#include "chrome/common/bindings_policy.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_action.h" @@ -758,12 +757,6 @@ bool TabContents::NavigateToPendingEntry( if (!dest_render_view_host) return false; // Unable to create the desired render view host. - // For security, we should never send non-DOM-UI URLs to a DOM UI renderer. - // Double check that here. - int enabled_bindings = dest_render_view_host->enabled_bindings(); - CHECK(!BindingsPolicy::is_dom_ui_enabled(enabled_bindings) || - DOMUIFactory::HasDOMUIScheme(entry.url())); - // Tell DevTools agent that it is attached prior to the navigation. DevToolsManager* devtools_manager = DevToolsManager::GetInstance(); if (devtools_manager) { // NULL in unit tests. -- cgit v1.1