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

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: Nit fixes 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
« no previous file with comments | « chrome/browser/ui/browser_otr_state_android.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61d60ed364e7650ea8f13649bbc0ed9fbcbb9696..da8703ffa39e9a219e2fd0ba226ac04b2a259935 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.h"
+#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
+#endif
+
using content::UserMetricsAction;
using content::WebContents;
@@ -283,7 +288,11 @@ void BrowsingHistoryHandler::HandleRemoveURLsOnOneDay(const ListValue* args) {
void BrowsingHistoryHandler::HandleClearBrowsingData(const ListValue* args) {
#if defined(OS_ANDROID)
- NOTIMPLEMENTED() << "TODO(yfriedman): Upstream the Android version.";
+ Profile* profile = Profile::FromWebUI(web_ui());
+ const TabModel* tab_model =
+ TabModelList::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.
« no previous file with comments | « chrome/browser/ui/browser_otr_state_android.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698