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

Unified Diff: chrome/browser/dom_ui/history_ui.cc

Issue 2941001: Removal of TabContentsDelegate::GetBrowser() interface method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/dom_ui/history2_ui.cc ('k') | chrome/browser/extensions/extension_dom_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/history_ui.cc
===================================================================
--- chrome/browser/dom_ui/history_ui.cc (revision 54528)
+++ chrome/browser/dom_ui/history_ui.cc (working copy)
@@ -17,6 +17,7 @@
#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser.h"
+#include "chrome/browser/browser_list.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_ui/dom_ui_favicon_source.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -235,8 +236,11 @@
}
void BrowsingHistoryHandler::HandleClearBrowsingData(const Value* value) {
- dom_ui_->tab_contents()->delegate()->GetBrowser()->
- OpenClearBrowsingDataDialog();
+ // TODO(beng): This is an improper direct dependency on Browser. Route this
+ // through some sort of delegate.
+ Browser* browser = BrowserList::FindBrowserWithProfile(dom_ui_->GetProfile());
+ if (browser)
+ browser->OpenClearBrowsingDataDialog();
}
void BrowsingHistoryHandler::QueryComplete(
« no previous file with comments | « chrome/browser/dom_ui/history2_ui.cc ('k') | chrome/browser/extensions/extension_dom_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698