| Index: chrome/browser/dom_ui/new_tab_ui.cc
|
| ===================================================================
|
| --- chrome/browser/dom_ui/new_tab_ui.cc (revision 12332)
|
| +++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
|
| @@ -243,6 +243,8 @@
|
| l10n_util::GetString(IDS_NEW_TAB_BOOKMARKS));
|
| localized_strings.SetString(L"showhistory",
|
| l10n_util::GetString(IDS_NEW_TAB_HISTORY_SHOW));
|
| + localized_strings.SetString(L"showhistoryurl",
|
| + chrome::kChromeUIHistoryURL);
|
| localized_strings.SetString(L"searchhistory",
|
| l10n_util::GetString(IDS_NEW_TAB_HISTORY_SEARCH));
|
| localized_strings.SetString(L"recentlyclosed",
|
| @@ -905,9 +907,6 @@
|
| public:
|
| explicit HistoryHandler(DOMUI* dom_ui);
|
|
|
| - // Callback which navigates to the history page.
|
| - void HandleShowHistoryPage(const Value*);
|
| -
|
| // Callback which navigates to the history page and performs a search.
|
| void HandleSearchHistoryPage(const Value* content);
|
|
|
| @@ -920,22 +919,10 @@
|
| HistoryHandler::HistoryHandler(DOMUI* dom_ui)
|
| : DOMMessageHandler(dom_ui),
|
| dom_ui_(dom_ui) {
|
| - dom_ui->RegisterMessageCallback("showHistoryPage",
|
| - NewCallback(this, &HistoryHandler::HandleShowHistoryPage));
|
| dom_ui->RegisterMessageCallback("searchHistoryPage",
|
| NewCallback(this, &HistoryHandler::HandleSearchHistoryPage));
|
| }
|
|
|
| -void HistoryHandler::HandleShowHistoryPage(const Value*) {
|
| - NavigationController* controller = dom_ui_->web_contents()->controller();
|
| - if (controller) {
|
| - UserMetrics::RecordAction(L"NTP_ShowHistory", dom_ui_->GetProfile());
|
| - controller->LoadURL(GURL(chrome::kChromeUINewTabURL), GURL(),
|
| - PageTransition::LINK);
|
| - // We are deleted by LoadURL, so do not call anything else.
|
| - }
|
| -}
|
| -
|
| void HistoryHandler::HandleSearchHistoryPage(const Value* content) {
|
| if (content && content->GetType() == Value::TYPE_LIST) {
|
| const ListValue* list_value = static_cast<const ListValue*>(content);
|
|
|