diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 18:21:03 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 18:21:03 +0000 |
commit | a8ad78109b8332225248a382ee750f94536daa6c (patch) | |
tree | 7358152a500f2e2d6268cbbfdc30cbe4b38ca2fe /chrome/browser/dom_ui | |
parent | 96bac982eb0d93f254c9f14e918fd0ed8199cd0c (diff) | |
download | chromium_src-a8ad78109b8332225248a382ee750f94536daa6c.zip chromium_src-a8ad78109b8332225248a382ee750f94536daa6c.tar.gz chromium_src-a8ad78109b8332225248a382ee750f94536daa6c.tar.bz2 |
New tab page was linking to the wrong URL for the history page. We don't need the message and can just put an actual URL in the page.
BUG=8961
Review URL: http://codereview.chromium.org/49014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 3dd58fc..199e5db 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -243,6 +243,8 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path, 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", @@ -907,9 +909,6 @@ class HistoryHandler : public DOMMessageHandler { 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); @@ -922,22 +921,10 @@ class HistoryHandler : public DOMMessageHandler { 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); |