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

Unified Diff: chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc

Issue 256763004: Remove WebUI NTP on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: newt's nits Created 6 years, 8 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/webui/ntp/ntp_resource_cache.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
index 8f17411c9a53c0cb315f673cafa4754353a3f309..0121b917c3535942f9d0b013cbf5c212af303795 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
@@ -18,10 +18,6 @@
#include "content/public/browser/web_ui.h"
#include "ui/base/webui/web_ui_util.h"
-#if defined(OS_ANDROID)
-#include "chrome/browser/sessions/session_restore.h"
-#endif
-
namespace {
void TabToValue(const TabRestoreService::Tab& tab,
@@ -76,23 +72,6 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const base::ListValue* args) {
double session_to_restore = 0.0;
CHECK(args->GetDouble(0, &session_to_restore));
-#if defined(OS_ANDROID)
- // Find and remove the corresponding tab entry from TabRestoreService.
- // We take ownership of the returned tab.
- scoped_ptr<TabRestoreService::Tab> tab_entry(
- tab_restore_service_->RemoveTabEntryById(static_cast<int>(
- session_to_restore)));
- if (tab_entry.get() == NULL)
- return;
-
- // RestoreForeignSessionTab needs a SessionTab.
- SessionTab session_tab;
- session_tab.current_navigation_index = tab_entry->current_navigation_index;
- session_tab.navigations = tab_entry->navigations;
-
- SessionRestore::RestoreForeignSessionTab(web_ui()->GetWebContents(),
- session_tab, NEW_FOREGROUND_TAB);
-#else
double index = -1.0;
CHECK(args->GetDouble(1, &index));
@@ -115,7 +94,6 @@ void RecentlyClosedTabsHandler::HandleReopenTab(const base::ListValue* args) {
disposition);
// The current tab has been nuked at this point; don't touch any member
// variables.
-#endif
}
void RecentlyClosedTabsHandler::HandleClearRecentlyClosed(
@@ -134,7 +112,7 @@ void RecentlyClosedTabsHandler::HandleGetRecentlyClosedTabs(
void RecentlyClosedTabsHandler::TabRestoreServiceChanged(
TabRestoreService* service) {
- base::ListValue list_value;
+ base::ListValue list_value;
const int max_count = 10;
int added_count = 0;
// We filter the list of recently closed to only show 'interesting' entries,
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698