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

Unified Diff: chrome/browser/ui/webui/options/handler_options_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/options/handler_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/handler_options_handler.cc b/chrome/browser/ui/webui/options/handler_options_handler.cc
index 721968927f1fe24c823ec7bd5e1ac4e6cc64370f..3dff19501a57e5ab96d9319b46f59ebd1fda7ff8 100644
--- a/chrome/browser/ui/webui/options/handler_options_handler.cc
+++ b/chrome/browser/ui/webui/options/handler_options_handler.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
+#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -43,9 +44,11 @@ void HandlerOptionsHandler::GetLocalizedValues(
void HandlerOptionsHandler::Initialize() {
UpdateHandlerList();
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
notification_registrar_.Add(
this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
- Source<Profile>(web_ui_->GetProfile()));
+ Source<Profile>(profile));
}
void HandlerOptionsHandler::RegisterMessages() {
@@ -64,7 +67,9 @@ void HandlerOptionsHandler::RegisterMessages() {
ProtocolHandlerRegistry* HandlerOptionsHandler::GetProtocolHandlerRegistry() {
DCHECK(web_ui_);
- return web_ui_->GetProfile()->GetProtocolHandlerRegistry();
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
+ return profile->GetProtocolHandlerRegistry();
}
static void GetHandlersAsListValue(

Powered by Google App Engine
This is Rietveld 408576698