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

Unified Diff: chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.cc

Issue 9288074: Rename WebUIFactory to WebUIControllerFactory since that's what it creates now. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: blah Created 8 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
Index: chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.cc
===================================================================
--- chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.cc (revision 119190)
+++ chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h"
+#include "chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
@@ -11,49 +11,52 @@
using content::WebUI;
using content::WebUIController;
-TestChromeWebUIFactory::WebUIProvider::~WebUIProvider() {
+TestChromeWebUIControllerFactory::WebUIProvider::~WebUIProvider() {
}
-TestChromeWebUIFactory::TestChromeWebUIFactory() {
+TestChromeWebUIControllerFactory::TestChromeWebUIControllerFactory() {
}
-TestChromeWebUIFactory::~TestChromeWebUIFactory() {
+TestChromeWebUIControllerFactory::~TestChromeWebUIControllerFactory() {
}
-void TestChromeWebUIFactory::AddFactoryOverride(const std::string& host,
- WebUIProvider* provider) {
+void TestChromeWebUIControllerFactory::AddFactoryOverride(
+ const std::string& host, WebUIProvider* provider) {
DCHECK_EQ(0U, GetInstance()->factory_overrides_.count(host));
GetInstance()->factory_overrides_[host] = provider;
}
-void TestChromeWebUIFactory::RemoveFactoryOverride(const std::string& host) {
+void TestChromeWebUIControllerFactory::RemoveFactoryOverride(
+ const std::string& host) {
DCHECK_EQ(1U, GetInstance()->factory_overrides_.count(host));
GetInstance()->factory_overrides_.erase(host);
}
-WebUI::TypeID TestChromeWebUIFactory::GetWebUIType(
+WebUI::TypeID TestChromeWebUIControllerFactory::GetWebUIType(
content::BrowserContext* browser_context, const GURL& url) const {
Profile* profile = Profile::FromBrowserContext(browser_context);
WebUIProvider* provider = GetWebUIProvider(profile, url);
return provider ? reinterpret_cast<WebUI::TypeID>(provider) :
- ChromeWebUIFactory::GetWebUIType(profile, url);
+ ChromeWebUIControllerFactory::GetWebUIType(profile, url);
}
-WebUIController* TestChromeWebUIFactory::CreateWebUIForURL(
+WebUIController* TestChromeWebUIControllerFactory::CreateWebUIControllerForURL(
content::WebUI* web_ui, const GURL& url) const {
Profile* profile = Profile::FromWebUI(web_ui);
WebUIProvider* provider = GetWebUIProvider(profile, url);
return provider ? provider->NewWebUI(web_ui, url) :
- ChromeWebUIFactory::CreateWebUIForURL(web_ui, url);
+ ChromeWebUIControllerFactory::CreateWebUIControllerForURL(web_ui, url);
}
-TestChromeWebUIFactory* TestChromeWebUIFactory::GetInstance() {
- return static_cast<TestChromeWebUIFactory*>(
- ChromeWebUIFactory::GetInstance());
+TestChromeWebUIControllerFactory*
+ TestChromeWebUIControllerFactory::GetInstance() {
+ return static_cast<TestChromeWebUIControllerFactory*>(
+ ChromeWebUIControllerFactory::GetInstance());
}
-TestChromeWebUIFactory::WebUIProvider* TestChromeWebUIFactory::GetWebUIProvider(
- Profile* profile, const GURL& url) const {
+TestChromeWebUIControllerFactory::WebUIProvider*
+ TestChromeWebUIControllerFactory::GetWebUIProvider(
+ Profile* profile, const GURL& url) const {
FactoryOverridesMap::const_iterator found =
factory_overrides_.find(url.host());
return (found == factory_overrides_.end()) ? NULL : found->second;

Powered by Google App Engine
This is Rietveld 408576698