Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromeos/chromeos_utils.h" | |
| 6 | |
| 7 #include "base/sys_info.h" | |
| 8 | |
| 9 namespace chromeos { | |
| 10 | |
| 11 namespace { | |
| 12 const char* kChromeboxBoards[] = { "stumpy", "panther" }; | |
| 13 } | |
| 14 | |
| 15 std::string GetChromeDeviceType() { | |
| 16 std::string board = base::SysInfo::GetLsbReleaseBoard(); | |
| 17 for (unsigned int i = 0; i < arraysize(kChromeboxBoards); ++i) { | |
| 18 std::string chromebox = kChromeboxBoards[i]; | |
| 19 if (board.compare(0, chromebox.length(), chromebox) == 0) | |
| 20 return "Chromebox"; | |
| 21 } | |
| 22 return "Chromebook"; | |
|
xiyuan
2014/03/15 00:54:56
These are UI facing strings. Shouldn't them be in
Tim Song
2014/03/17 19:12:07
Hmm... there are a few other places that does a ch
xiyuan
2014/03/17 20:04:50
One possible solution is that GetChromeDeviceType
| |
| 23 } | |
| 24 | |
| 25 } // namespace chromeos | |
| OLD | NEW |