diff options
Diffstat (limited to 'sync/util/get_session_name.cc')
-rw-r--r-- | sync/util/get_session_name.cc | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/sync/util/get_session_name.cc b/sync/util/get_session_name.cc index d51c93e..3a09c51 100644 --- a/sync/util/get_session_name.cc +++ b/sync/util/get_session_name.cc @@ -11,10 +11,7 @@ #include "base/sys_info.h" #include "base/task_runner.h" -#if defined(OS_CHROMEOS) -#include "base/command_line.h" -#include "chromeos/chromeos_switches.h" -#elif defined(OS_LINUX) +#if defined(OS_LINUX) #include "sync/util/get_session_name_linux.h" #elif defined(OS_IOS) #include "sync/util/get_session_name_ios.h" @@ -33,27 +30,7 @@ namespace { std::string GetSessionNameSynchronously() { std::string session_name; #if defined(OS_CHROMEOS) - // The approach below is similar to that used by the CrOs implementation of - // StatisticsProvider::GetMachineStatistic(CHROMEOS_RELEASE_BOARD). - // See chromeos/system/statistics_provider.{h|cc}. - // - // We cannot use StatisticsProvider here because of the mutual dependency - // it creates between sync.gyp:sync and chrome.gyp:browser. - // - // Even though this code is ad hoc and fragile, it remains the only means of - // determining the Chrome OS hardware platform so we can display the right - // device name in the "Other devices" section of the new tab page. - // TODO(rsimha): Change this once a better alternative is available. - // See http://crbug.com/126732. - std::string board; - const CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(chromeos::switches::kChromeOSReleaseBoard)) { - board = command_line-> - GetSwitchValueASCII(chromeos::switches::kChromeOSReleaseBoard); - } else { - LOG(ERROR) << "Failed to get board information"; - } - + std::string board = base::SysInfo::GetLsbReleaseBoard(); // Currently, only "stumpy" type of board is considered Chromebox, and // anything else is Chromebook. On these devices, session_name should look // like "stumpy-signed-mp-v2keys" etc. The information can be checked on |