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

Unified Diff: chrome/browser/chromeos/version_loader.h

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/version_loader.h
diff --git a/chrome/browser/chromeos/version_loader.h b/chrome/browser/chromeos/version_loader.h
index 66a36cdf4e6373be3a727e212ce103141f48899e..6361bcb4ac796bc1d3801f2260ea25dc1932262e 100644
--- a/chrome/browser/chromeos/version_loader.h
+++ b/chrome/browser/chromeos/version_loader.h
@@ -53,13 +53,7 @@ class VersionLoader {
CancelableTaskTracker::TaskId GetFirmware(const GetFirmwareCallback& callback,
CancelableTaskTracker* tracker);
- static const char kFullVersionPrefix[];
- static const char kVersionPrefix[];
- static const char kFirmwarePrefix[];
-
private:
- FRIEND_TEST_ALL_PREFIXES(VersionLoaderTest, ParseFullVersion);
- FRIEND_TEST_ALL_PREFIXES(VersionLoaderTest, ParseVersion);
FRIEND_TEST_ALL_PREFIXES(VersionLoaderTest, ParseFirmware);
// VersionLoader calls into the Backend in the blocking thread pool to load
@@ -68,13 +62,12 @@ class VersionLoader {
public:
Backend() {}
- // Calls ParseVersion to get the version # and notifies request.
- // This is invoked in the blocking thread pool.
- // If |full_version| is true then extra info is passed in version string.
+ // Gets the version number from base::SysInfo. This is invoked on the
+ // blocking thread pool.
void GetVersion(VersionFormat format, std::string* version);
- // Calls ParseFirmware to get the firmware # and notifies request.
- // This is invoked in the blocking thread pool.
+ // Calls ParseFirmware to get the firmware value. This is invoked on the
+ // blocking thread pool.
void GetFirmware(std::string* firmware);
private:
@@ -85,11 +78,6 @@ class VersionLoader {
DISALLOW_COPY_AND_ASSIGN(Backend);
};
- // Extracts the version from the file.
- // |prefix| specifies what key defines version data.
- static std::string ParseVersion(const std::string& contents,
- const std::string& prefix);
-
// Extracts the firmware from the file.
static std::string ParseFirmware(const std::string& contents);
« no previous file with comments | « chrome/browser/chromeos/system_logs/lsb_release_log_source_unittest.cc ('k') | chrome/browser/chromeos/version_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698