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

Unified Diff: content/browser/webui/web_ui_impl.cc

Issue 11819050: Revert 175890: actually, looks like we want this to also help move chromeos webui pages out of src/… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/webui/web_ui_controller_factory_registry.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_impl.cc
===================================================================
--- content/browser/webui/web_ui_impl.cc (revision 175970)
+++ content/browser/webui/web_ui_impl.cc (working copy)
@@ -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,13 +77,10 @@
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()) ||
- !factory->IsURLAcceptableForWebUI(web_contents_->GetBrowserContext(),
- source_url,
- data_urls_allowed)) {
+ !WebUIControllerFactoryRegistry::GetInstance()->IsURLAcceptableForWebUI(
+ web_contents_->GetBrowserContext(), source_url, data_urls_allowed)) {
NOTREACHED() << "Blocked unauthorized use of WebUIBindings.";
return;
}
« no previous file with comments | « content/browser/webui/web_ui_controller_factory_registry.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698