summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/downloads_ui.cc
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 16:52:05 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 16:52:05 +0000
commitbfcbc8140240a2207f98105e2025aff87d470495 (patch)
tree154c781115878ad9cc186c25546bde3ba13cb125 /chrome/browser/dom_ui/downloads_ui.cc
parent1a151fb5f0a18cbf30005400ff1fe872915f8c8d (diff)
downloadchromium_src-bfcbc8140240a2207f98105e2025aff87d470495.zip
chromium_src-bfcbc8140240a2207f98105e2025aff87d470495.tar.gz
chromium_src-bfcbc8140240a2207f98105e2025aff87d470495.tar.bz2
Add date information to the downloads page.
BUG=8433 Review URL: http://codereview.chromium.org/55002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/downloads_ui.cc')
-rw-r--r--chrome/browser/dom_ui/downloads_ui.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc
index 50c588f..80678d9 100644
--- a/chrome/browser/dom_ui/downloads_ui.cc
+++ b/chrome/browser/dom_ui/downloads_ui.cc
@@ -379,6 +379,10 @@ DictionaryValue* DownloadsDOMHandler::CreateDownloadItemValue(
file_value->SetInteger(L"started",
static_cast<int>(download->start_time().ToTimeT()));
+ file_value->SetString(L"since_string",
+ TimeFormat::RelativeDate(download->start_time(), NULL));
+ file_value->SetString(L"date_string",
+ base::TimeFormatShortDate(download->start_time()));
file_value->SetInteger(L"id", id);
file_value->SetString(L"file_path", download->full_path().ToWStringHack());
file_value->SetString(L"file_name", download->GetFileName().ToWStringHack());