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

Unified Diff: sync/util/get_session_name.cc

Issue 10836257: Prefix match CHROMEOS_RELEASE_BOARD for checking chromebox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for comments Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/get_session_name.cc
diff --git a/sync/util/get_session_name.cc b/sync/util/get_session_name.cc
index 99a4ce01e51978b25c88bf5188f39e68f2ce29f3..3eede5af9db9b7b8bfbe9b56e3cf8d32a6f6bd9c 100644
--- a/sync/util/get_session_name.cc
+++ b/sync/util/get_session_name.cc
@@ -30,7 +30,7 @@ namespace {
std::string GetSessionNameSynchronously() {
std::string session_name;
#if defined(OS_CHROMEOS)
- // TODO(kochi): This is very ad hoc and fragile. http://crosbug.com/30619.
+ // TODO(kochi): This is very ad hoc and fragile. http://crbug.com/126732.
std::string board;
const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD";
chromeos::system::StatisticsProvider* provider =
@@ -38,8 +38,10 @@ std::string GetSessionNameSynchronously() {
if (!provider->GetMachineStatistic(kMachineInfoBoard, &board))
LOG(ERROR) << "Failed to get board information";
// Currently, only "stumpy" type of board is considered Chromebox, and
- // anything else is Chromebook.
- session_name = (board == "stumpy") ? "Chromebox" : "Chromebook";
+ // anything else is Chromebook. On these devices, session_name should look
+ // like "stumpy-signed-mp-v2keys" etc. The information can be checked on
+ // "CHROMEOS_RELEASE_BOARD" line in chrome://system.
+ session_name = board.substr(0, 6) == "stumpy" ? "Chromebox" : "Chromebook";
#elif defined(OS_LINUX)
session_name = base::GetLinuxDistro();
#elif defined(OS_MACOSX)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698