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

Unified Diff: chrome/browser/chromeos/external_metrics.cc

Issue 23588009: Parse /etc/lsb-release only once on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
Index: chrome/browser/chromeos/external_metrics.cc
diff --git a/chrome/browser/chromeos/external_metrics.cc b/chrome/browser/chromeos/external_metrics.cc
index b0ae2988743963e81b9293c8930d80a5cab56e36..55d0d3b96e99c45e54a99f6130fc9de21af145ea 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -97,17 +97,8 @@ void SetupProgressiveScanFieldTrial() {
}
// Finds out if we're on a 2GB Parrot.
-//
-// This code reads and parses /etc/lsb-release. There are at least four other
-// places that open and parse /etc/lsb-release, and I wish I could fix the
-// mess. At least this code is temporary.
-
bool Is2GBParrot() {
- base::FilePath path("/etc/lsb-release");
- std::string contents;
- if (!base::ReadFileToString(path, &contents))
- return false;
- if (contents.find("CHROMEOS_RELEASE_BOARD=parrot") == std::string::npos)
+ if (base::SysInfo::GetLsbReleaseBoard() != "parrot")
return false;
// There are 2GB and 4GB models.
return base::SysInfo::AmountOfPhysicalMemory() <= 2LL * 1024 * 1024 * 1024;
« no previous file with comments | « chrome/browser/chromeos/extensions/info_private_api.cc ('k') | chrome/browser/chromeos/system/statistics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698