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

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

Issue 2068843002: [Tracing] Set os-name to CrOS in trace metadata, and get the correct version for it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ommited os-arch Created 4 years, 6 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 8380c45c44cd2924301ebd3b7e34f803daf23480..7aed1fc7ef3b94879843fec53e4c7af407e7e53f 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -117,9 +117,21 @@ std::unique_ptr<base::DictionaryValue> GenerateTracingMetadataDict() {
metadata_dict->SetString("user-agent", GetContentClient()->GetUserAgent());
// OS
+#if defined(OS_CHROMEOS)
+ metadata_dict->SetString("os-name", "CrOS");
+ int32_t major_version;
+ int32_t minor_version;
+ int32_t bugfix_version;
+ base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version,
oystein (OOO til 10th of July) 2016/06/19 08:59:44 What's the functional difference between setting o
+ &bugfix_version);
+ metadata_dict->SetString(
+ "os-version", base::StringPrintf("%d.%d.%d", major_version, minor_version,
+ bugfix_version));
+#elif
oystein (OOO til 10th of July) 2016/06/19 08:59:44 #else i guess :)
metadata_dict->SetString("os-name", base::SysInfo::OperatingSystemName());
metadata_dict->SetString("os-version",
base::SysInfo::OperatingSystemVersion());
+#endif
metadata_dict->SetString("os-arch",
base::SysInfo::OperatingSystemArchitecture());
« 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