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

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

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 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_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);
}

Powered by Google App Engine
This is Rietveld 408576698