Added function to provide the short board name of the device

To be used in Chrome OS when separating functionality based on board.

Fixed the bad usage of GetLsbReleaseBoard().

BUG=653814,663857

Review-Url: https://codereview.chromium.org/2489853002
Cr-Commit-Position: refs/heads/master@{#435679}


CrOS-Libchrome-Original-Commit: 1a5a3f57210bc089a74d37ef6cc50f034d281c41
diff --git a/base/sys_info_chromeos.cc b/base/sys_info_chromeos.cc
index e4d671f..29f8384 100644
--- a/base/sys_info_chromeos.cc
+++ b/base/sys_info_chromeos.cc
@@ -200,6 +200,16 @@
 }
 
 // static
+std::string SysInfo::GetStrippedReleaseBoard() {
+  std::string board = GetLsbReleaseBoard();
+  const size_t index = board.find("-signed-");
+  if (index != std::string::npos)
+    board.resize(index);
+
+  return base::ToLowerASCII(board);
+}
+
+// static
 Time SysInfo::GetLsbReleaseTime() {
   return GetChromeOSVersionInfo().lsb_release_time();
 }