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

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

Issue 10701030: Refactor SyncedWindowDelegateAndroid into TabModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made some changes from a downstream review Created 8 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
Index: chrome/browser/ui/webui/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 2a41cec1691185cc383ac08ecf87ab9e78763b0b..5b6a7d0e9dc51913264b10882d485758e95ea5fa 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -49,6 +49,11 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/ui/android/tab_model/tab_model_android.h"
+#include "chrome/browser/ui/android/tab_model/tab_model_list_android.h"
+#endif
+
using content::UserMetricsAction;
using content::WebContents;
@@ -282,12 +287,15 @@ void BrowsingHistoryHandler::HandleRemoveURLsOnOneDay(const ListValue* args) {
}
void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) {
+ Profile* profile = Profile::FromWebUI(web_ui());
#if defined(OS_ANDROID)
- NOTIMPLEMENTED() << "TODO(yfriedman): Upstream the Android version.";
+ const TabModelAndroid* tab_model =
+ TabModelListAndroid::GetTabModelWithProfile(profile);
+ if (tab_model)
+ tab_model->OpenClearBrowsingData();
#else
// TODO(beng): This is an improper direct dependency on Browser. Route this
// through some sort of delegate.
- Profile* profile = Profile::FromWebUI(web_ui());
Browser* browser = browser::FindBrowserWithProfile(profile);
if (browser)
chrome::ShowClearBrowsingDataDialog(browser);

Powered by Google App Engine
This is Rietveld 408576698