diff options
Diffstat (limited to 'chrome/browser/dom_ui/history_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/history_ui.cc | 70 |
1 files changed, 33 insertions, 37 deletions
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc index bbc1602..9bc5d61 100644 --- a/chrome/browser/dom_ui/history_ui.cc +++ b/chrome/browser/dom_ui/history_ui.cc @@ -49,32 +49,32 @@ HistoryUIHTMLSource::HistoryUIHTMLSource() void HistoryUIHTMLSource::StartDataRequest(const std::string& path, int request_id) { DictionaryValue localized_strings; - localized_strings.SetString(LIT16("title"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_TITLE))); - localized_strings.SetString(LIT16("loading"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_LOADING))); - localized_strings.SetString(LIT16("newest"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_NEWEST))); - localized_strings.SetString(LIT16("newer"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_NEWER))); - localized_strings.SetString(LIT16("older"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_OLDER))); - localized_strings.SetString(LIT16("searchresultsfor"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_SEARCHRESULTSFOR))); - localized_strings.SetString(LIT16("history"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_BROWSERESULTS))); - localized_strings.SetString(LIT16("cont"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_CONTINUED))); - localized_strings.SetString(LIT16("searchbutton"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_SEARCH_BUTTON))); - localized_strings.SetString(LIT16("noresults"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_NO_RESULTS))); - localized_strings.SetString(LIT16("noitems"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_NO_ITEMS))); - localized_strings.SetString(LIT16("deleteday"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_DELETE_PRIOR_VISITS_LINK))); - localized_strings.SetString(LIT16("deletedaywarning"), - WideToUTF16Hack(l10n_util::GetString(IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING))); + localized_strings.SetString(L"title", + l10n_util::GetString(IDS_HISTORY_TITLE)); + localized_strings.SetString(L"loading", + l10n_util::GetString(IDS_HISTORY_LOADING)); + localized_strings.SetString(L"newest", + l10n_util::GetString(IDS_HISTORY_NEWEST)); + localized_strings.SetString(L"newer", + l10n_util::GetString(IDS_HISTORY_NEWER)); + localized_strings.SetString(L"older", + l10n_util::GetString(IDS_HISTORY_OLDER)); + localized_strings.SetString(L"searchresultsfor", + l10n_util::GetString(IDS_HISTORY_SEARCHRESULTSFOR)); + localized_strings.SetString(L"history", + l10n_util::GetString(IDS_HISTORY_BROWSERESULTS)); + localized_strings.SetString(L"cont", + l10n_util::GetString(IDS_HISTORY_CONTINUED)); + localized_strings.SetString(L"searchbutton", + l10n_util::GetString(IDS_HISTORY_SEARCH_BUTTON)); + localized_strings.SetString(L"noresults", + l10n_util::GetString(IDS_HISTORY_NO_RESULTS)); + localized_strings.SetString(L"noitems", + l10n_util::GetString(IDS_HISTORY_NO_ITEMS)); + localized_strings.SetString(L"deleteday", + l10n_util::GetString(IDS_HISTORY_DELETE_PRIOR_VISITS_LINK)); + localized_strings.SetString(L"deletedaywarning", + l10n_util::GetString(IDS_HISTORY_DELETE_PRIOR_VISITS_WARNING)); static const StringPiece history_html( ResourceBundle::GetSharedInstance().GetRawDataResource( @@ -226,7 +226,7 @@ void BrowsingHistoryHandler::QueryComplete( SetURLAndTitle(page_value, page.title(), page.url()); // Need to pass the time in epoch time (fastest JS conversion). - page_value->SetInteger(LIT16("time"), + page_value->SetInteger(L"time", static_cast<int>(page.visit_time().ToTimeT())); // Until we get some JS i18n infrastructure, we also need to @@ -246,17 +246,13 @@ void BrowsingHistoryHandler::QueryComplete( IDS_HISTORY_DATE_WITH_RELATIVE_TIME, date_str, base::TimeFormatFriendlyDate(page.visit_time())); } - page_value->SetString(LIT16("dateRelativeDay"), - WideToUTF16Hack(date_str)); - page_value->SetString( - LIT16("dateTimeOfDay"), - WideToUTF16Hack(base::TimeFormatTimeOfDay(page.visit_time()))); + page_value->SetString(L"dateRelativeDay", date_str); + page_value->SetString(L"dateTimeOfDay", + base::TimeFormatTimeOfDay(page.visit_time())); } else { - page_value->SetString( - LIT16("dateShort"), - WideToUTF16Hack(base::TimeFormatShortDate(page.visit_time()))); - page_value->SetString( - LIT16("snippet"), WideToUTF16Hack(page.snippet().text())); + page_value->SetString(L"dateShort", + base::TimeFormatShortDate(page.visit_time())); + page_value->SetString(L"snippet", page.snippet().text()); } page_value->SetBoolean(L"starred", dom_ui_->get_profile()->GetBookmarkModel()->IsBookmarked(page.url())); |