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

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

Issue 49014: New tab page was linking to the wrong URL for the history page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « no previous file | chrome/browser/resources/new_tab.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/resources/new_tab.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698