Index: chrome/browser/ui/webui/help/help_handler.cc |
diff --git a/chrome/browser/ui/webui/help/help_handler.cc b/chrome/browser/ui/webui/help/help_handler.cc |
index 6f3a246be2f659665f21efb848e254bb3cae6b65..a66089976faf6bd460a28234f87971d4ba054841 100644 |
--- a/chrome/browser/ui/webui/help/help_handler.cc |
+++ b/chrome/browser/ui/webui/help/help_handler.cc |
@@ -34,6 +34,8 @@ |
#include "webkit/glue/webkit_glue.h" |
#if defined(OS_CHROMEOS) |
+#include "base/i18n/time_formatting.h" |
+#include "base/sys_info.h" |
#include "chrome/browser/chromeos/login/user_manager.h" |
#include "chrome/browser/chromeos/cros_settings.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -90,6 +92,17 @@ bool CanChangeReleaseChannel() { |
return false; |
} |
+string16 CreateLastUpdatedString() { |
James Hawkins
2012/04/13 03:36:17
nit: Document method.
Kyle Horimoto
2012/04/13 18:12:38
Done.
|
+ base::Time time; |
+ |
+ if (!base::SysInfo::GetTimeLastUpdated(&time)) |
+ // If the time of the last update cannot be retrieved, we punt and just |
James Hawkins
2012/04/13 03:36:17
nit: nix 'we'.
Kyle Horimoto
2012/04/13 18:12:38
Done.
|
+ // set the last update time to be the current time. |
+ time = base::Time::Now(); |
+ |
+ return base::TimeFormatFriendlyDate(time); |
+} |
+ |
#endif // defined(OS_CHROMEOS) |
} // namespace |
@@ -136,6 +149,7 @@ void HelpHandler::GetLocalizedValues(DictionaryValue* localized_strings) { |
{ "webkit", IDS_WEBKIT }, |
{ "userAgent", IDS_ABOUT_VERSION_USER_AGENT }, |
{ "commandLine", IDS_ABOUT_VERSION_COMMAND_LINE }, |
+ { "lastUpdated", IDS_ABOUT_VERSION_LAST_UPDATED }, |
#endif |
#if defined(OS_MACOSX) |
{ "promote", IDS_ABOUT_CHROME_PROMOTE_UPDATER }, |
@@ -164,6 +178,8 @@ void HelpHandler::GetLocalizedValues(DictionaryValue* localized_strings) { |
IDS_ABOUT_CROS_VERSION_LICENSE, |
ASCIIToUTF16(chrome::kChromeUIOSCreditsURL)); |
localized_strings->SetString("productOsLicense", os_license); |
+ |
+ localized_strings->SetString("lastUpdatedDate", CreateLastUpdatedString()); |
#endif |
string16 tos = l10n_util::GetStringFUTF16( |