summaryrefslogtreecommitdiffstats
path: root/base/linux_util.cc
diff options
context:
space:
mode:
authorcmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 16:19:56 +0000
committercmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 16:19:56 +0000
commita4564b2f4508cc140e014e41c7259bfc5e717191 (patch)
treef04c26021325f532283d38598e4f5f9b88bbc714 /base/linux_util.cc
parent7d489139cb1039373a51b20ca6637132043ded72 (diff)
downloadchromium_src-a4564b2f4508cc140e014e41c7259bfc5e717191.zip
chromium_src-a4564b2f4508cc140e014e41c7259bfc5e717191.tar.gz
chromium_src-a4564b2f4508cc140e014e41c7259bfc5e717191.tar.bz2
On Linux, Chrome uses lsb_release (a python script) to determine the name of the distro. On Chrome OS, we don't need to do this.
Review URL: http://codereview.chromium.org/285013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.cc')
-rw-r--r--base/linux_util.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc
index 40ca627..fa40f53 100644
--- a/base/linux_util.cc
+++ b/base/linux_util.cc
@@ -121,6 +121,9 @@ std::string GetLinuxDistro() {
LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::Get();
LinuxDistroState state = distro_state_singleton->State();
if (STATE_DID_NOT_CHECK == state) {
+#if defined(OS_CHROMEOS)
+ linux_distro = "CrOS";
+#else // if defined(OS_LINUX)
// We do this check only once per process. If it fails, there's
// little reason to believe it will work if we attempt to run
// lsb_release again.
@@ -135,6 +138,7 @@ std::string GetLinuxDistro() {
if (output.compare(0, field.length(), field) == 0)
linux_distro = output.substr(field.length());
}
+#endif
distro_state_singleton->CheckFinished();
return linux_distro;
} else if (STATE_CHECK_STARTED == state) {