| Index: chrome/browser/ui/webui/test_chrome_web_ui_factory.cc
|
| diff --git a/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc b/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc
|
| index 467d194da8e7d4db77158b30de056605cba69abc..91da7d4b74943f555abfdcdf6e6625a21b658483 100644
|
| --- a/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc
|
| +++ b/chrome/browser/ui/webui/test_chrome_web_ui_factory.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/ui/webui/test_chrome_web_ui_factory.h"
|
|
|
| +#include "chrome/browser/profiles/profile.h"
|
| #include "content/browser/tab_contents/tab_contents.h"
|
|
|
| TestChromeWebUIFactory::WebUIProvider::~WebUIProvider() {
|
| @@ -27,7 +28,8 @@ void TestChromeWebUIFactory::RemoveFactoryOverride(const std::string& host) {
|
| }
|
|
|
| WebUI::TypeID TestChromeWebUIFactory::GetWebUIType(
|
| - Profile* profile, const GURL& url) const {
|
| + content::BrowserContext* context, const GURL& url) const {
|
| + Profile* profile = static_cast<Profile*>(context);
|
| WebUIProvider* provider = GetWebUIProvider(profile, url);
|
| return provider ? reinterpret_cast<WebUI::TypeID>(provider) :
|
| ChromeWebUIFactory::GetWebUIType(profile, url);
|
| @@ -35,7 +37,8 @@ WebUI::TypeID TestChromeWebUIFactory::GetWebUIType(
|
|
|
| WebUI* TestChromeWebUIFactory::CreateWebUIForURL(TabContents* tab_contents,
|
| const GURL& url) const {
|
| - WebUIProvider* provider = GetWebUIProvider(tab_contents->profile(), url);
|
| + Profile* profile = static_cast<Profile*>(tab_contents->context());
|
| + WebUIProvider* provider = GetWebUIProvider(profile, url);
|
| return provider ? provider->NewWebUI(tab_contents, url) :
|
| ChromeWebUIFactory::CreateWebUIForURL(tab_contents, url);
|
| }
|
|
|