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

Unified Diff: base/sys_info_chromeos.cc

Issue 2489853002: Added function to provide the short board name of the device (Closed)
Patch Set: Fixed review comments Created 4 years, 1 month 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: base/sys_info_chromeos.cc
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index e4d671f75d956eadcff5d8dd5adddbab4e5d33d5..2aff34afe40f1952c6d0aa04b93e493aa360fcdb 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -200,6 +200,17 @@ std::string SysInfo::GetLsbReleaseBoard() {
}
// static
+std::string SysInfo::GetStrippedReleaseBoard() {
+ std::string board = GetLsbReleaseBoard();
+ const size_t index = board.find("-signed-");
+ if (index != std::string::npos) {
Alexei Svitkine (slow) 2016/11/28 16:03:28 Nit: No {}
igorcov 2016/11/28 16:37:08 Done.
+ board.resize(index);
+ }
+
+ return base::ToLowerASCII(board);
+}
+
+// static
Time SysInfo::GetLsbReleaseTime() {
return GetChromeOSVersionInfo().lsb_release_time();
}

Powered by Google App Engine
This is Rietveld 408576698