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

Unified Diff: base/linux_util.cc

Issue 307027: Trim the lsb_release output in GetLinuxDistro. (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 29698)
+++ base/linux_util.cc (working copy)
@@ -143,8 +143,10 @@
if (output.length() > 0) {
// lsb_release -d should return: Description:<tab>Distro Info
static const std::string field = "Description:\t";
- if (output.compare(0, field.length(), field) == 0)
+ if (output.compare(0, field.length(), field) == 0) {
linux_distro = output.substr(field.length());
+ TrimWhitespaceASCII(linux_distro, TRIM_ALL, &linux_distro);
+ }
}
distro_state_singleton->CheckFinished();
return linux_distro;
« 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