metrics: Use integer types from stdint.h
This CL replaces the deprecated int* and uint* types from
'base/basictypes.h' with the int*_t and uint*_t types from 'stdint.h'.
BUG=chromium:401356
TEST=`FEATURES=test emerge-$BOARD metrics`
Change-Id: Ie5a69edba2c8a9d5185bbc548ed70a5b121c3e3b
Reviewed-on: https://chromium-review.googlesource.com/211381
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/metrics/persistent_integer.h b/metrics/persistent_integer.h
index 4a5670c..b1cfcf4 100644
--- a/metrics/persistent_integer.h
+++ b/metrics/persistent_integer.h
@@ -5,7 +5,8 @@
#ifndef METRICS_PERSISTENT_INTEGER_H_
#define METRICS_PERSISTENT_INTEGER_H_
-#include <base/basictypes.h>
+#include <stdint.h>
+
#include <string>
namespace chromeos_metrics {
@@ -22,20 +23,20 @@
virtual ~PersistentInteger();
// Sets the value. This writes through to the backing file.
- void Set(int64 v);
+ void Set(int64_t v);
// Gets the value. May sync from backing file first.
- int64 Get();
+ int64_t Get();
// Returns the name of the object.
std::string Name() { return name_; }
// Convenience function for Get() followed by Set(0).
- int64 GetAndClear();
+ int64_t GetAndClear();
// Convenience function for v = Get, Set(v + x).
// Virtual only because of mock.
- virtual void Add(int64 x);
+ virtual void Add(int64_t x);
// After calling with |testing| = true, changes some behavior for the purpose
// of testing. For instance: instances created while testing use the current
@@ -53,8 +54,8 @@
// a valid backing file as a side effect.
bool Read();
- int64 value_;
- int32 version_;
+ int64_t value_;
+ int32_t version_;
std::string name_;
std::string backing_file_name_;
bool synced_;