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

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

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 years, 4 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/net_internals_ui.cc
diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc
index 548b50cd7a44e2935350b6b535cf36ff22ab40b4..c2de1c14aec7855fdbe4564b047d5994f7bfb247 100644
--- a/chrome/browser/ui/webui/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals_ui.cc
@@ -465,14 +465,15 @@ NetInternalsMessageHandler::~NetInternalsMessageHandler() {
WebUIMessageHandler* NetInternalsMessageHandler::Attach(WebUI* web_ui) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- PrefService* pref_service = web_ui->GetProfile()->GetPrefs();
+ Profile* profile = Profile::FromWebUI(web_ui);
+ PrefService* pref_service = profile->GetPrefs();
http_throttling_enabled_.Init(
prefs::kHttpThrottlingEnabled, pref_service, this);
http_throttling_may_experiment_.Init(
prefs::kHttpThrottlingMayExperiment, pref_service, NULL);
proxy_ = new IOThreadImpl(this->AsWeakPtr(), g_browser_process->io_thread(),
- web_ui->GetProfile()->GetRequestContext());
+ profile->GetRequestContext());
#ifdef OS_CHROMEOS
syslogs_getter_.reset(new SystemLogsGetter(this,
chromeos::system::SyslogsProvider::GetInstance()));
@@ -481,7 +482,7 @@ WebUIMessageHandler* NetInternalsMessageHandler::Attach(WebUI* web_ui) {
proxy_->CreateCallback(&IOThreadImpl::OnRendererReady));
prerender::PrerenderManager* prerender_manager =
- web_ui->GetProfile()->GetPrerenderManager();
+ profile->GetPrerenderManager();
if (prerender_manager) {
prerender_manager_ = prerender_manager->AsWeakPtr();
} else {
« no previous file with comments | « chrome/browser/ui/webui/media/media_internals_handler.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698