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

Unified Diff: chrome/browser/ui/webui/options/website_settings_handler.cc

Issue 445623003: Surface the audited last usage time in a user readable string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the font changes up to #origin-list. Created 6 years, 4 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 | « chrome/browser/resources/options/website_settings.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/website_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/website_settings_handler.cc b/chrome/browser/ui/webui/options/website_settings_handler.cc
index ffcb8e2617001b63687d92a833fa0b6fc2d3ec23..8eca40c1451144c69a13e1109de3e4bbae0a5de8 100644
--- a/chrome/browser/ui/webui/options/website_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/website_settings_handler.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_ui.h"
#include "grit/generated_resources.h"
+#include "ui/base/l10n/time_format.h"
#include "ui/base/text/bytes_formatting.h"
namespace {
@@ -159,6 +160,11 @@ void WebsiteSettingsHandler::UpdateOrigins() {
base::DictionaryValue* origin_entry = new base::DictionaryValue();
origin_entry->SetDoubleWithoutPathExpansion("usage",
last_usage.ToDoubleT());
+ origin_entry->SetStringWithoutPathExpansion(
+ "usageString",
+ ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_ELAPSED,
+ ui::TimeFormat::LENGTH_SHORT,
+ base::Time::Now() - last_usage));
origins.SetWithoutPathExpansion(origin, origin_entry);
}
« no previous file with comments | « chrome/browser/resources/options/website_settings.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698