Index: chrome/browser/chromeos/chromeos_utils.cc |
diff --git a/chrome/browser/chromeos/chromeos_utils.cc b/chrome/browser/chromeos/chromeos_utils.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..64a820c6959c1e614591fcf7af29f220ecbb949e |
--- /dev/null |
+++ b/chrome/browser/chromeos/chromeos_utils.cc |
@@ -0,0 +1,27 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/chromeos/chromeos_utils.h" |
+ |
+#include "base/sys_info.h" |
+#include "grit/generated_resources.h" |
+#include "ui/base/l10n/l10n_util.h" |
+ |
+namespace chromeos { |
+ |
+namespace { |
+ const char* kChromeboxBoards[] = { "stumpy", "panther" }; |
Mattias Nissler (ping if slow)
2014/03/19 18:15:19
indentation should be zero spaces.
Also, are you
Tim Song
2014/03/19 23:41:37
Done. It's better to keep this list up to date her
|
+} |
+ |
+base::string16 GetChromeDeviceType() { |
+ std::string board = base::SysInfo::GetLsbReleaseBoard(); |
+ for (unsigned int i = 0; i < arraysize(kChromeboxBoards); ++i) { |
+ std::string chromebox = kChromeboxBoards[i]; |
+ if (board.compare(0, chromebox.length(), chromebox) == 0) |
+ return l10n_util::GetStringUTF16(IDS_CHROMEBOX); |
+ } |
+ return l10n_util::GetStringUTF16(IDS_CHROMEBOOK); |
+} |
+ |
+} // namespace chromeos |