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

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: Fix tests 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..f8da0d349f658e90c170f64acb6469b810748613 100644
--- a/chrome/browser/chromeos/external_metrics.cc
+++ b/chrome/browser/chromeos/external_metrics.cc
@@ -103,11 +103,7 @@ void SetupProgressiveScanFieldTrial() {
// mess. At least this code is temporary.
Daniel Erat 2013/09/24 15:37:53 nit: delete this outdated comment
stevenjb 2013/09/24 17:18:34 Done.
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")
Daniel Erat 2013/09/24 15:37:53 this code makes me sad. (probably not your fault.
stevenjb 2013/09/24 17:18:34 Yeah... at least we're not doing an extra file rea
return false;
// There are 2GB and 4GB models.
return base::SysInfo::AmountOfPhysicalMemory() <= 2LL * 1024 * 1024 * 1024;

Powered by Google App Engine
This is Rietveld 408576698