diff options
Diffstat (limited to 'chrome/browser/extensions/extension_dom_ui.cc')
-rw-r--r-- | chrome/browser/extensions/extension_dom_ui.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc index b23d12c..29768b9 100644 --- a/chrome/browser/extensions/extension_dom_ui.cc +++ b/chrome/browser/extensions/extension_dom_ui.cc @@ -177,12 +177,9 @@ void ExtensionDOMUI::ProcessDOMUIMessage(const std::string& message, } Browser* ExtensionDOMUI::GetBrowser() const { - Browser* browser = NULL; - TabContentsDelegate* tab_contents_delegate = tab_contents()->delegate(); - if (tab_contents_delegate) - browser = tab_contents_delegate->GetBrowser(); - - return browser; + // TODO(beng): This is an improper direct dependency on Browser. Route this + // through some sort of delegate. + return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); } Profile* ExtensionDOMUI::GetProfile() { |