Index: chrome/browser/extensions/extension_debugger_api.cc |
diff --git a/chrome/browser/extensions/extension_debugger_api.cc b/chrome/browser/extensions/extension_debugger_api.cc |
index 3a694cba0053f4f69ed894c8b91ac1a7c71b5094..e86a6bb682d65a54525382622921c16433fbfd8c 100644 |
--- a/chrome/browser/extensions/extension_debugger_api.cc |
+++ b/chrome/browser/extensions/extension_debugger_api.cc |
@@ -118,7 +118,8 @@ ExtensionDevToolsClientHost::ExtensionDevToolsClientHost( |
// Detach from debugger when extension unloads. |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
- Source<Profile>(tab_contents_->profile())); |
+ Source<Profile>( |
+ static_cast<Profile*>(tab_contents_->context()))); |
// Attach to debugger and tell it we are ready. |
DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor( |
@@ -142,7 +143,7 @@ bool ExtensionDevToolsClientHost::MatchesContentsAndExtensionId( |
// DevToolsClientHost interface |
void ExtensionDevToolsClientHost::InspectedTabClosing() { |
// Tell extension that this client host has been detached. |
- Profile* profile = tab_contents_->profile(); |
+ Profile* profile = static_cast<Profile*>(tab_contents_->context()); |
if (profile != NULL && profile->GetExtensionEventRouter()) { |
ListValue args; |
args.Append(Value::CreateIntegerValue(tab_id_)); |
@@ -205,7 +206,7 @@ void ExtensionDevToolsClientHost::Observe( |
void ExtensionDevToolsClientHost::OnDispatchOnInspectorFrontend( |
const std::string& data) { |
- Profile* profile = tab_contents_->profile(); |
+ Profile* profile = static_cast<Profile*>(tab_contents_->context()); |
if (profile == NULL || !profile->GetExtensionEventRouter()) |
return; |