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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 2125983002: Bulk Reports - Add datetime metadata to traces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove "ms". Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index 5756c737a5ac7328514f94e9b2113513bd400150..e5f5a9b64447c4ef7620dfbd42f0fe6b82a9df52 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -168,6 +168,13 @@ std::unique_ptr<base::DictionaryValue> GenerateTracingMetadataDict() {
metadata_dict->SetBoolean("highres-ticks",
base::TimeTicks::IsHighResolution());
+ base::Time::Exploded ctime;
+ base::Time::Now().UTCExplode(&ctime);
+ std::string time_string = base::StringPrintf("%u-%u-%u %d:%d:%d",
+ ctime.year, ctime.month, ctime.day_of_month, ctime.hour,
+ ctime.minute, ctime.second);
+ metadata_dict->SetString("trace-capture-datetime", time_string);
+
return metadata_dict;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698