metrics_daemon: fix harmless confusion in writing persistent integers
As the subject says, I don't think this can change any of the
behavior, but the argument to Write() was ignored and merely
confusing.
BUG=chromium:339588
TEST=ran unit tests
Change-Id: Ie6d59e6879a734523978c21d66170721e0f499c7
Reviewed-on: https://chromium-review.googlesource.com/194919
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
diff --git a/metrics/persistent_integer.h b/metrics/persistent_integer.h
index 7d920b5..5b159c7 100644
--- a/metrics/persistent_integer.h
+++ b/metrics/persistent_integer.h
@@ -45,11 +45,12 @@
private:
static const int kVersion = 1001;
- // Writes |value| to the backing file, creating it if necessary.
- void Write(int64 value);
+ // Writes |value_| to the backing file, creating it if necessary.
+ void Write();
// Reads the value from the backing file, stores it in |value_|, and returns
- // true if the backing file is valid. Returns false otherwise.
+ // true if the backing file is valid. Returns false otherwise, and creates
+ // a valid backing file as a side effect.
bool Read();
int64 value_;