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

Unified Diff: chromeos/system/version_loader.cc

Issue 1905113002: Add ARC version to help and version pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: chromeos/system/version_loader.cc
diff --git a/chromeos/system/version_loader.cc b/chromeos/system/version_loader.cc
index f62ea0668d4fdcf852fb279408d34e0c599874bf..c8cb84f5a72ff20bf3f78df068fff6b5c99e9f79 100644
--- a/chromeos/system/version_loader.cc
+++ b/chromeos/system/version_loader.cc
@@ -29,6 +29,9 @@ const char kFullVersionKey[] = "CHROMEOS_RELEASE_DESCRIPTION";
// Same but for short version (x.x.xx.x).
const char kVersionKey[] = "CHROMEOS_RELEASE_VERSION";
+// Same but for ARC version.
+const char kArcVersionKey[] = "CHROMEOS_ARC_VERSION";
+
// Beginning of line we look for that gives the firmware version.
const char kFirmwarePrefix[] = "version";
@@ -58,6 +61,16 @@ std::string GetVersion(VersionFormat format) {
return version;
}
+std::string GetARCVersion() {
+ std::string version;
+ if (!base::SysInfo::GetLsbReleaseValue(kArcVersionKey, &version)) {
+ LOG_IF(ERROR, base::SysInfo::IsRunningOnChromeOS())
+ << "No LSB version key: " << kArcVersionKey;
+ version = "";
stevenjb 2016/04/21 19:38:54 nit: not strictly necessary, version will not be s
elijahtaylor1 2016/04/21 20:23:12 Done.
+ }
+ return version;
+}
+
std::string GetFirmware() {
std::string firmware;
std::string contents;

Powered by Google App Engine
This is Rietveld 408576698