summaryrefslogtreecommitdiffstats
path: root/content/browser/webui/web_ui_impl.cc
diff options
context:
space:
mode:
authorricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 08:34:28 +0000
committerricow@chromium.org <ricow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 08:34:28 +0000
commit3c7883723fd18c52db3b3a84f68f96968a21cb97 (patch)
treed23ff490779abc5a74056536f74dfec35d57797d /content/browser/webui/web_ui_impl.cc
parentb1a2b5456d9a4180fd3fea825e94f51fd1837a21 (diff)
downloadchromium_src-3c7883723fd18c52db3b3a84f68f96968a21cb97.zip
chromium_src-3c7883723fd18c52db3b3a84f68f96968a21cb97.tar.gz
chromium_src-3c7883723fd18c52db3b3a84f68f96968a21cb97.tar.bz2
Revert 175971
> Revert 175890: actually, looks like we want this to also help move chromeos webui pages out of src/chrome. > > Revert 175822 > > > > After more investigation of what it would take to share the webui code framework from chrome with content, it didn't seam feasible to do this. The code in chrome (i.e. ChromeURLDataManager) is heavily tied to chrome, and is used by chrome for non-webui stuff. The JS code is also specific to Chrome. It seems better to not bring in all this stuff to content. > > > > > Allow multiple WebUIControllerFactory objects to be registered. This makes is possible to implement webui inside content. > > > Review URL: https://codereview.chromium.org/11783038 > > > > TBR=jam@chromium.org > > Review URL: https://codereview.chromium.org/11818036 > > TBR=jam@chromium.org > Review URL: https://codereview.chromium.org/11819050 This seems like the most obvious candidate for chromiumos failures: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/11017 http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28amd64%29/builds/5918 TBR=jam@chromium.org Review URL: https://codereview.chromium.org/11828040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/webui/web_ui_impl.cc')
-rw-r--r--content/browser/webui/web_ui_impl.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
index 5155702..772e22d 100644
--- a/content/browser/webui/web_ui_impl.cc
+++ b/content/browser/webui/web_ui_impl.cc
@@ -13,12 +13,12 @@
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_ui_controller.h"
+#include "content/public/browser/web_ui_controller_factory.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_client.h"
@@ -77,10 +77,13 @@ void WebUIImpl::OnWebUISend(const GURL& source_url,
const ListValue& args) {
WebContentsDelegate* delegate = web_contents_->GetDelegate();
bool data_urls_allowed = delegate && delegate->CanLoadDataURLsInWebUI();
+ WebUIControllerFactory* factory =
+ GetContentClient()->browser()->GetWebUIControllerFactory();
if (!ChildProcessSecurityPolicyImpl::GetInstance()->
HasWebUIBindings(web_contents_->GetRenderProcessHost()->GetID()) ||
- !WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI(
- web_contents_->GetBrowserContext(), source_url, data_urls_allowed)) {
+ !factory->IsURLAcceptableForWebUI(web_contents_->GetBrowserContext(),
+ source_url,
+ data_urls_allowed)) {
NOTREACHED() << "Blocked unauthorized use of WebUIBindings.";
return;
}