libchromeos: void OsReleaseReader.Load()
Previously OsReleaseReader returned a bool, which meant that code that
called load wanted to CHECK the return values and possibly log warning
messages, etc. This was unecessary since OsReleaseReader.Load never
returns false.
TEST=unittests
BUG=none
Change-Id: I7064c6a788897b5d5c687d6c9c5f4e03d4ca21a7
Reviewed-on: https://chromium-review.googlesource.com/223990
Reviewed-by: Bertrand Simonnet <bsimonnet@google.com>
Commit-Queue: Nathan Bullock <nathanbullock@google.com>
Tested-by: Nathan Bullock <nathanbullock@google.com>
diff --git a/chromeos/osrelease_reader.h b/chromeos/osrelease_reader.h
index 8e8c4d0..93db457 100644
--- a/chromeos/osrelease_reader.h
+++ b/chromeos/osrelease_reader.h
@@ -24,15 +24,14 @@
// Loads the key=value pairs from either /etc/os-release.d/<KEY> or
// /etc/os-release.
- // Returns false on errors.
- bool Load();
+ void Load();
// Same as the private Load method.
// This need to be public so that services can use it in testing mode (for
// autotest tests for example).
// This should not be used in production so suffix it with TestingOnly to
// make it obvious.
- bool LoadTestingOnly(const base::FilePath& root_dir);
+ void LoadTestingOnly(const base::FilePath& root_dir);
// Getter for the given key. Returns whether the key was found on the store.
bool GetString(const std::string& key, std::string* value) const;
@@ -44,8 +43,8 @@
// os-release can be lazily loaded if need be.
bool initialized_;
- // Load the data from a given root_dir. Return false on errors.
- CHROMEOS_PRIVATE bool Load(const base::FilePath& root_dir);
+ // Load the data from a given root_dir.
+ CHROMEOS_PRIVATE void Load(const base::FilePath& root_dir);
DISALLOW_COPY_AND_ASSIGN(OsReleaseReader);
};