diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 22:09:33 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 22:09:33 +0000 |
commit | 94aa5bb1cfbc03344928e8cd55ecd5c54cce0088 (patch) | |
tree | 6a437b9fd00d7b655dd2494f328341f36942d4e1 | |
parent | 19289d00bada609db08b87c8697d718366e509c6 (diff) | |
download | chromium_src-94aa5bb1cfbc03344928e8cd55ecd5c54cce0088.zip chromium_src-94aa5bb1cfbc03344928e8cd55ecd5c54cce0088.tar.gz chromium_src-94aa5bb1cfbc03344928e8cd55ecd5c54cce0088.tar.bz2 |
Trim the lsb_release output in GetLinuxDistro.
BUG=none
TEST=With crash reporting enabled, renderer process command line doesn't have a trailing '?' in the --enable-crash-reporter switch value.
Review URL: http://codereview.chromium.org/307027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29718 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/linux_util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc index c3198f6..03254de 100644 --- a/base/linux_util.cc +++ b/base/linux_util.cc @@ -143,8 +143,10 @@ std::string GetLinuxDistro() { 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; |