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

Unified Diff: base/linux_util.cc

Issue 285013: On Linux, Chrome uses lsb_release (a python script) to determine the name of ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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: base/linux_util.cc
===================================================================
--- base/linux_util.cc (revision 29208)
+++ base/linux_util.cc (working copy)
@@ -121,6 +121,9 @@
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 @@
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) {
« 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