summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-22 10:06:13 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-22 18:07:10 +0000
commitd41cf18d9d44f9a75de1b260779b23a9670dc664 (patch)
tree0797ae739b931ec8e12859bd10ffc5cd84a6f77c
parent3984dea280eb8dd69e792c4c8ef11071ee6260a6 (diff)
downloadchromium_src-d41cf18d9d44f9a75de1b260779b23a9670dc664.zip
chromium_src-d41cf18d9d44f9a75de1b260779b23a9670dc664.tar.gz
chromium_src-d41cf18d9d44f9a75de1b260779b23a9670dc664.tar.bz2
Switch to standard integer types in rlz/.
BUG=138542 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1547683004 Cr-Commit-Position: refs/heads/master@{#366614}
-rw-r--r--rlz/chromeos/lib/rlz_value_store_chromeos.cc4
-rw-r--r--rlz/chromeos/lib/rlz_value_store_chromeos.h8
-rw-r--r--rlz/lib/crc8_unittest.cc2
-rw-r--r--rlz/lib/financial_ping.cc17
-rw-r--r--rlz/lib/financial_ping_test.cc26
-rw-r--r--rlz/lib/lib_values.cc4
-rw-r--r--rlz/lib/lib_values.h7
-rw-r--r--rlz/lib/machine_id.cc2
-rw-r--r--rlz/lib/rlz_lib.cc2
-rw-r--r--rlz/lib/rlz_lib.h1
-rw-r--r--rlz/lib/rlz_lib_test.cc5
-rw-r--r--rlz/lib/rlz_value_store.h16
-rw-r--r--rlz/lib/string_utils_unittest.cc4
-rw-r--r--rlz/mac/lib/machine_id_mac.cc2
-rw-r--r--rlz/mac/lib/rlz_value_store_mac.h8
-rw-r--r--rlz/mac/lib/rlz_value_store_mac.mm4
-rw-r--r--rlz/test/rlz_test_helpers.cc8
-rw-r--r--rlz/test/rlz_test_helpers.h1
-rw-r--r--rlz/test/rlz_unittest_main.cc1
-rw-r--r--rlz/win/dll/exports.cc2
-rw-r--r--rlz/win/lib/machine_deal.cc3
-rw-r--r--rlz/win/lib/machine_id_win.cc1
-rw-r--r--rlz/win/lib/process_info.cc2
-rw-r--r--rlz/win/lib/process_info.h2
-rw-r--r--rlz/win/lib/registry_util.h2
-rw-r--r--rlz/win/lib/rlz_lib_win.cc2
-rw-r--r--rlz/win/lib/rlz_value_store_registry.cc7
-rw-r--r--rlz/win/lib/rlz_value_store_registry.h8
28 files changed, 100 insertions, 51 deletions
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.cc b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
index 6714de4..8d526fe 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.cc
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
@@ -94,14 +94,14 @@ bool RlzValueStoreChromeOS::HasAccess(AccessType type) {
return type == kReadAccess || !read_only_;
}
-bool RlzValueStoreChromeOS::WritePingTime(Product product, int64 time) {
+bool RlzValueStoreChromeOS::WritePingTime(Product product, int64_t time) {
DCHECK(CalledOnValidThread());
rlz_store_->SetString(GetKeyName(kPingTimeKey, product),
base::Int64ToString(time));
return true;
}
-bool RlzValueStoreChromeOS::ReadPingTime(Product product, int64* time) {
+bool RlzValueStoreChromeOS::ReadPingTime(Product product, int64_t* time) {
DCHECK(CalledOnValidThread());
std::string ping_time;
return rlz_store_->GetString(GetKeyName(kPingTimeKey, product), &ping_time) &&
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.h b/rlz/chromeos/lib/rlz_value_store_chromeos.h
index 946d56b..e4c557f 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.h
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.h
@@ -5,7 +5,11 @@
#ifndef RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_
#define RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "base/values.h"
#include "rlz/lib/rlz_value_store.h"
@@ -33,8 +37,8 @@ class RlzValueStoreChromeOS : public RlzValueStore,
// RlzValueStore overrides:
bool HasAccess(AccessType type) override;
- bool WritePingTime(Product product, int64 time) override;
- bool ReadPingTime(Product product, int64* time) override;
+ bool WritePingTime(Product product, int64_t time) override;
+ bool ReadPingTime(Product product, int64_t* time) override;
bool ClearPingTime(Product product) override;
bool WriteAccessPointRlz(AccessPoint access_point,
diff --git a/rlz/lib/crc8_unittest.cc b/rlz/lib/crc8_unittest.cc
index 4889242..2a2f5f0 100644
--- a/rlz/lib/crc8_unittest.cc
+++ b/rlz/lib/crc8_unittest.cc
@@ -4,6 +4,8 @@
//
// Uniitest for data encryption functions.
+#include <stddef.h>
+
#include "base/logging.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc
index b58ce96..e1e5eed 100644
--- a/rlz/lib/financial_ping.cc
+++ b/rlz/lib/financial_ping.cc
@@ -6,13 +6,16 @@
#include "rlz/lib/financial_ping.h"
+#include <stdint.h>
+
#include "base/atomicops.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "rlz/lib/assert.h"
#include "rlz/lib/lib_values.h"
#include "rlz/lib/machine_id.h"
@@ -64,7 +67,7 @@ namespace {
// Returns the time relative to a fixed point in the past in multiples of
// 100 ns stepts. The point in the past is arbitrary but can't change, as the
// result of this value is stored on disk.
-int64 GetSystemTimeAsInt64() {
+int64_t GetSystemTimeAsInt64() {
#if defined(OS_WIN)
FILETIME now_as_file_time;
// Relative to Jan 1, 1601 (UTC).
@@ -77,7 +80,7 @@ int64 GetSystemTimeAsInt64() {
#else
// Seconds since epoch (Jan 1, 1970).
double now_seconds = base::Time::Now().ToDoubleT();
- return static_cast<int64>(now_seconds * 1000 * 1000 * 10);
+ return static_cast<int64_t>(now_seconds * 1000 * 1000 * 10);
#endif
}
@@ -354,12 +357,12 @@ bool FinancialPing::IsPingTime(Product product, bool no_delay) {
if (!store || !store->HasAccess(RlzValueStore::kReadAccess))
return false;
- int64 last_ping = 0;
+ int64_t last_ping = 0;
if (!store->ReadPingTime(product, &last_ping))
return true;
- uint64 now = GetSystemTimeAsInt64();
- int64 interval = now - last_ping;
+ uint64_t now = GetSystemTimeAsInt64();
+ int64_t interval = now - last_ping;
// If interval is negative, clock was probably reset. So ping.
if (interval < 0)
@@ -382,7 +385,7 @@ bool FinancialPing::UpdateLastPingTime(Product product) {
if (!store || !store->HasAccess(RlzValueStore::kWriteAccess))
return false;
- uint64 now = GetSystemTimeAsInt64();
+ uint64_t now = GetSystemTimeAsInt64();
return store->WritePingTime(product, now);
}
diff --git a/rlz/lib/financial_ping_test.cc b/rlz/lib/financial_ping_test.cc
index 4580a1f..dae9551 100644
--- a/rlz/lib/financial_ping_test.cc
+++ b/rlz/lib/financial_ping_test.cc
@@ -16,11 +16,14 @@
#include "rlz/lib/financial_ping.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
#include "rlz/lib/lib_values.h"
#include "rlz/lib/machine_id.h"
#include "rlz/lib/rlz_lib.h"
@@ -38,7 +41,7 @@
namespace {
// Must match the implementation in file_time.cc.
-int64 GetSystemTimeAsInt64() {
+int64_t GetSystemTimeAsInt64() {
#if defined(OS_WIN)
FILETIME now_as_file_time;
GetSystemTimeAsFileTime(&now_as_file_time);
@@ -48,12 +51,12 @@ int64 GetSystemTimeAsInt64() {
return integer.QuadPart;
#else
double now_seconds = base::Time::Now().ToDoubleT();
- return static_cast<int64>(now_seconds * 1000 * 1000 * 10);
+ return static_cast<int64_t>(now_seconds * 1000 * 1000 * 10);
#endif
}
// Ping times in 100-nanosecond intervals.
-const int64 k1MinuteInterval = 60LL * 10000000LL; // 1 minute
+const int64_t k1MinuteInterval = 60LL * 10000000LL; // 1 minute
} // namespace anonymous
@@ -178,8 +181,7 @@ TEST_F(FinancialPingTest, FormRequestBadBrand) {
EXPECT_EQ(rlz_lib::SupplementaryBranding::GetBrand().empty(), ok);
}
-
-static void SetLastPingTime(int64 time, rlz_lib::Product product) {
+static void SetLastPingTime(int64_t time, rlz_lib::Product product) {
rlz_lib::ScopedRlzValueStoreLock lock;
rlz_lib::RlzValueStore* store = lock.GetStore();
ASSERT_TRUE(store);
@@ -188,8 +190,8 @@ static void SetLastPingTime(int64 time, rlz_lib::Product product) {
}
TEST_F(FinancialPingTest, IsPingTime) {
- int64 now = GetSystemTimeAsInt64();
- int64 last_ping = now - rlz_lib::kEventsPingInterval - k1MinuteInterval;
+ int64_t now = GetSystemTimeAsInt64();
+ int64_t last_ping = now - rlz_lib::kEventsPingInterval - k1MinuteInterval;
SetLastPingTime(last_ping, rlz_lib::TOOLBAR_NOTIFIER);
// No events, last ping just over a day ago.
@@ -240,8 +242,8 @@ TEST_F(FinancialPingTest, BrandingIsPingTime) {
if (!rlz_lib::SupplementaryBranding::GetBrand().empty())
return;
- int64 now = GetSystemTimeAsInt64();
- int64 last_ping = now - rlz_lib::kEventsPingInterval - k1MinuteInterval;
+ int64_t now = GetSystemTimeAsInt64();
+ int64_t last_ping = now - rlz_lib::kEventsPingInterval - k1MinuteInterval;
SetLastPingTime(last_ping, rlz_lib::TOOLBAR_NOTIFIER);
// Has events, last ping just over a day ago.
@@ -275,8 +277,8 @@ TEST_F(FinancialPingTest, BrandingIsPingTime) {
}
TEST_F(FinancialPingTest, ClearLastPingTime) {
- int64 now = GetSystemTimeAsInt64();
- int64 last_ping = now - rlz_lib::kEventsPingInterval + k1MinuteInterval;
+ int64_t now = GetSystemTimeAsInt64();
+ int64_t last_ping = now - rlz_lib::kEventsPingInterval + k1MinuteInterval;
SetLastPingTime(last_ping, rlz_lib::TOOLBAR_NOTIFIER);
// Has events, last ping just under a day ago.
diff --git a/rlz/lib/lib_values.cc b/rlz/lib/lib_values.cc
index 397668b..1829993 100644
--- a/rlz/lib/lib_values.cc
+++ b/rlz/lib/lib_values.cc
@@ -45,8 +45,8 @@ const char kFinancialServer[] = "clients1.google.com";
const int kFinancialPort = 80;
// Ping times in 100-nanosecond intervals.
-const int64 kEventsPingInterval = 24LL * 3600LL * 10000000LL; // 1 day
-const int64 kNoEventsPingInterval = kEventsPingInterval * 7LL; // 1 week
+const int64_t kEventsPingInterval = 24LL * 3600LL * 10000000LL; // 1 day
+const int64_t kNoEventsPingInterval = kEventsPingInterval * 7LL; // 1 week
const char kFinancialPingUserAgent[] = "Mozilla/4.0 (compatible; Win32)";
const char* kFinancialPingResponseObjects[] = { "text/*", NULL };
diff --git a/rlz/lib/lib_values.h b/rlz/lib/lib_values.h
index 05fbc6b..742f32f 100644
--- a/rlz/lib/lib_values.h
+++ b/rlz/lib/lib_values.h
@@ -7,7 +7,8 @@
#ifndef RLZ_LIB_LIB_VALUES_H_
#define RLZ_LIB_LIB_VALUES_H_
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "rlz/lib/rlz_enums.h"
namespace rlz_lib {
@@ -75,8 +76,8 @@ extern const char kFinancialServer[];
extern const int kFinancialPort;
-extern const int64 kEventsPingInterval;
-extern const int64 kNoEventsPingInterval;
+extern const int64_t kEventsPingInterval;
+extern const int64_t kNoEventsPingInterval;
extern const char kFinancialPingUserAgent[];
extern const char* kFinancialPingResponseObjects[];
diff --git a/rlz/lib/machine_id.cc b/rlz/lib/machine_id.cc
index 1919d02..f59f37e 100644
--- a/rlz/lib/machine_id.cc
+++ b/rlz/lib/machine_id.cc
@@ -4,6 +4,8 @@
#include "rlz/lib/machine_id.h"
+#include <stddef.h>
+
#include "base/sha1.h"
#include "rlz/lib/assert.h"
#include "rlz/lib/crc8.h"
diff --git a/rlz/lib/rlz_lib.cc b/rlz/lib/rlz_lib.cc
index 71be967..6d88e29 100644
--- a/rlz/lib/rlz_lib.cc
+++ b/rlz/lib/rlz_lib.cc
@@ -9,8 +9,10 @@
#include <algorithm>
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "build/build_config.h"
#include "rlz/lib/assert.h"
#include "rlz/lib/crc32.h"
#include "rlz/lib/financial_ping.h"
diff --git a/rlz/lib/rlz_lib.h b/rlz/lib/rlz_lib.h
index afc2314..fe93013 100644
--- a/rlz/lib/rlz_lib.h
+++ b/rlz/lib/rlz_lib.h
@@ -12,6 +12,7 @@
#ifndef RLZ_LIB_RLZ_LIB_H_
#define RLZ_LIB_RLZ_LIB_H_
+#include <stddef.h>
#include <stdio.h>
#include <string>
diff --git a/rlz/lib/rlz_lib_test.cc b/rlz/lib/rlz_lib_test.cc
index 5e1be3c..666aee1 100644
--- a/rlz/lib/rlz_lib_test.cc
+++ b/rlz/lib/rlz_lib_test.cc
@@ -13,9 +13,12 @@
// The "GGLA" brand is used to test the normal code flow of the code, and the
// "TEST" brand is used to test the supplementary brand code code flow.
-#include "base/posix/eintr_wrapper.h"
+#include <stddef.h>
+
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/rlz/lib/rlz_value_store.h b/rlz/lib/rlz_value_store.h
index 4bd1f09..e2cc847 100644
--- a/rlz/lib/rlz_value_store.h
+++ b/rlz/lib/rlz_value_store.h
@@ -5,8 +5,14 @@
#ifndef RLZ_VALUE_STORE_H_
#define RLZ_VALUE_STORE_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include <string>
+#include <vector>
+
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "rlz/lib/rlz_enums.h"
#if defined(OS_WIN)
@@ -17,10 +23,6 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
-
-#include <string>
-#include <vector>
-
namespace base {
class FilePath;
}
@@ -37,8 +39,8 @@ class RlzValueStore {
virtual bool HasAccess(AccessType type) = 0;
// Ping times.
- virtual bool WritePingTime(Product product, int64 time) = 0;
- virtual bool ReadPingTime(Product product, int64* time) = 0;
+ virtual bool WritePingTime(Product product, int64_t time) = 0;
+ virtual bool ReadPingTime(Product product, int64_t* time) = 0;
virtual bool ClearPingTime(Product product) = 0;
// Access point RLZs.
diff --git a/rlz/lib/string_utils_unittest.cc b/rlz/lib/string_utils_unittest.cc
index d8be24a8..349a3bc 100644
--- a/rlz/lib/string_utils_unittest.cc
+++ b/rlz/lib/string_utils_unittest.cc
@@ -6,8 +6,10 @@
#include "rlz/lib/string_utils.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "rlz/lib/assert.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/rlz/mac/lib/machine_id_mac.cc b/rlz/mac/lib/machine_id_mac.cc
index 6dbb0d7..df9de63 100644
--- a/rlz/mac/lib/machine_id_mac.cc
+++ b/rlz/mac/lib/machine_id_mac.cc
@@ -7,6 +7,8 @@
#include <IOKit/network/IOEthernetController.h>
#include <IOKit/network/IOEthernetInterface.h>
#include <IOKit/network/IONetworkInterface.h>
+#include <stddef.h>
+#include <stdint.h>
#include "base/logging.h"
#include "base/mac/foundation_util.h"
diff --git a/rlz/mac/lib/rlz_value_store_mac.h b/rlz/mac/lib/rlz_value_store_mac.h
index 1cf9699..044a381 100644
--- a/rlz/mac/lib/rlz_value_store_mac.h
+++ b/rlz/mac/lib/rlz_value_store_mac.h
@@ -5,8 +5,12 @@
#ifndef RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_
#define RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/compiler_specific.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
#include "rlz/lib/rlz_value_store.h"
@class NSDictionary;
@@ -20,8 +24,8 @@ class RlzValueStoreMac : public RlzValueStore {
public:
bool HasAccess(AccessType type) override;
- bool WritePingTime(Product product, int64 time) override;
- bool ReadPingTime(Product product, int64* time) override;
+ bool WritePingTime(Product product, int64_t time) override;
+ bool ReadPingTime(Product product, int64_t* time) override;
bool ClearPingTime(Product product) override;
bool WriteAccessPointRlz(AccessPoint access_point,
diff --git a/rlz/mac/lib/rlz_value_store_mac.mm b/rlz/mac/lib/rlz_value_store_mac.mm
index 158fd88..44c73fd 100644
--- a/rlz/mac/lib/rlz_value_store_mac.mm
+++ b/rlz/mac/lib/rlz_value_store_mac.mm
@@ -67,13 +67,13 @@ bool RlzValueStoreMac::HasAccess(AccessType type) {
}
}
-bool RlzValueStoreMac::WritePingTime(Product product, int64 time) {
+bool RlzValueStoreMac::WritePingTime(Product product, int64_t time) {
NSNumber* n = [NSNumber numberWithLongLong:time];
[ProductDict(product) setObject:n forKey:kPingTimeKey];
return true;
}
-bool RlzValueStoreMac::ReadPingTime(Product product, int64* time) {
+bool RlzValueStoreMac::ReadPingTime(Product product, int64_t* time) {
if (NSNumber* n =
ObjCCast<NSNumber>([ProductDict(product) objectForKey:kPingTimeKey])) {
*time = [n longLongValue];
diff --git a/rlz/test/rlz_test_helpers.cc b/rlz/test/rlz_test_helpers.cc
index b056a81..f2b347a 100644
--- a/rlz/test/rlz_test_helpers.cc
+++ b/rlz/test/rlz_test_helpers.cc
@@ -6,10 +6,14 @@
#include "rlz_test_helpers.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <map>
#include <vector>
#include "base/strings/string16.h"
+#include "build/build_config.h"
#include "rlz/lib/rlz_lib.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -35,7 +39,7 @@ const wchar_t kHKLMAccessProviders[] =
struct RegistryValue {
base::string16 name;
DWORD type;
- std::vector<uint8> data;
+ std::vector<uint8_t> data;
};
struct RegistryKeyData {
@@ -52,7 +56,7 @@ void ReadRegistryTree(const base::win::RegKey& src, RegistryKeyData* data) {
for (; i.Valid(); ++i) {
RegistryValue& value = *data->values.insert(data->values.end(),
RegistryValue());
- const uint8* data = reinterpret_cast<const uint8*>(i.Value());
+ const uint8_t* data = reinterpret_cast<const uint8_t*>(i.Value());
value.name.assign(i.Name());
value.type = i.Type();
value.data.assign(data, data + i.ValueSize());
diff --git a/rlz/test/rlz_test_helpers.h b/rlz/test/rlz_test_helpers.h
index 7d24e62..b22e2b9 100644
--- a/rlz/test/rlz_test_helpers.h
+++ b/rlz/test/rlz_test_helpers.h
@@ -8,6 +8,7 @@
#define RLZ_TEST_RLZ_TEST_HELPERS_H
#include "base/compiler_specific.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_POSIX)
diff --git a/rlz/test/rlz_unittest_main.cc b/rlz/test/rlz_unittest_main.cc
index 9b73442..d6da7e7 100644
--- a/rlz/test/rlz_unittest_main.cc
+++ b/rlz/test/rlz_unittest_main.cc
@@ -6,6 +6,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
+#include "build/build_config.h"
#include "rlz/lib/rlz_lib.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/rlz/win/dll/exports.cc b/rlz/win/dll/exports.cc
index eb7d88d..4d7f8d4 100644
--- a/rlz/win/dll/exports.cc
+++ b/rlz/win/dll/exports.cc
@@ -4,6 +4,8 @@
//
// Functions exported by the RLZ DLL.
+#include <stddef.h>
+
#include "rlz/lib/rlz_lib.h"
#define RLZ_DLL_EXPORT extern "C" __declspec(dllexport)
diff --git a/rlz/win/lib/machine_deal.cc b/rlz/win/lib/machine_deal.cc
index 5b5d007..b3984e6 100644
--- a/rlz/win/lib/machine_deal.cc
+++ b/rlz/win/lib/machine_deal.cc
@@ -7,9 +7,10 @@
#include "rlz/win/lib/machine_deal.h"
#include <windows.h>
+#include <stddef.h>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
diff --git a/rlz/win/lib/machine_id_win.cc b/rlz/win/lib/machine_id_win.cc
index e5425c9..518c0da 100644
--- a/rlz/win/lib/machine_id_win.cc
+++ b/rlz/win/lib/machine_id_win.cc
@@ -6,6 +6,7 @@
#include <Sddl.h> // For ConvertSidToStringSidW.
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "rlz/lib/assert.h"
diff --git a/rlz/win/lib/process_info.cc b/rlz/win/lib/process_info.cc
index 8eceb35..9ac1f6f 100644
--- a/rlz/win/lib/process_info.cc
+++ b/rlz/win/lib/process_info.cc
@@ -7,7 +7,9 @@
#include "rlz/win/lib/process_info.h"
#include <windows.h>
+#include <stddef.h>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/process/process_info.h"
#include "base/strings/string16.h"
diff --git a/rlz/win/lib/process_info.h b/rlz/win/lib/process_info.h
index d3b39f3..cb1f8f7 100644
--- a/rlz/win/lib/process_info.h
+++ b/rlz/win/lib/process_info.h
@@ -7,7 +7,7 @@
#ifndef RLZ_WIN_LIB_PROCESS_INFO_H_
#define RLZ_WIN_LIB_PROCESS_INFO_H_
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace rlz_lib {
diff --git a/rlz/win/lib/registry_util.h b/rlz/win/lib/registry_util.h
index 1065233..1944516 100644
--- a/rlz/win/lib/registry_util.h
+++ b/rlz/win/lib/registry_util.h
@@ -5,6 +5,8 @@
#ifndef RLZ_WIN_LIB_REGISTRY_UTIL_H_
#define RLZ_WIN_LIB_REGISTRY_UTIL_H_
+#include <stddef.h>
+
namespace base {
namespace win {
class RegKey;
diff --git a/rlz/win/lib/rlz_lib_win.cc b/rlz/win/lib/rlz_lib_win.cc
index 1249fc3..bdf6f85 100644
--- a/rlz/win/lib/rlz_lib_win.cc
+++ b/rlz/win/lib/rlz_lib_win.cc
@@ -9,9 +9,9 @@
#include <windows.h>
#include <aclapi.h>
+#include <stddef.h>
#include <winerror.h>
-#include "base/basictypes.h"
#include "base/win/registry.h"
#include "rlz/lib/assert.h"
#include "rlz/lib/rlz_value_store.h"
diff --git a/rlz/win/lib/rlz_value_store_registry.cc b/rlz/win/lib/rlz_value_store_registry.cc
index b88707b..d8b93a5 100644
--- a/rlz/win/lib/rlz_value_store_registry.cc
+++ b/rlz/win/lib/rlz_value_store_registry.cc
@@ -4,6 +4,7 @@
#include "rlz/win/lib/rlz_value_store_registry.h"
+#include "base/macros.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
@@ -161,7 +162,7 @@ bool RlzValueStoreRegistry::HasAccess(AccessType type) {
return HasUserKeyAccess(type == kWriteAccess);
}
-bool RlzValueStoreRegistry::WritePingTime(Product product, int64 time) {
+bool RlzValueStoreRegistry::WritePingTime(Product product, int64_t time) {
base::win::RegKey key;
std::wstring product_name = GetWideProductName(product);
return GetPingTimesRegKey(KEY_WRITE, &key) &&
@@ -169,7 +170,7 @@ bool RlzValueStoreRegistry::WritePingTime(Product product, int64 time) {
REG_QWORD) == ERROR_SUCCESS;
}
-bool RlzValueStoreRegistry::ReadPingTime(Product product, int64* time) {
+bool RlzValueStoreRegistry::ReadPingTime(Product product, int64_t* time) {
base::win::RegKey key;
std::wstring product_name = GetWideProductName(product);
return GetPingTimesRegKey(KEY_READ, &key) &&
@@ -184,7 +185,7 @@ bool RlzValueStoreRegistry::ClearPingTime(Product product) {
key.DeleteValue(product_name.c_str());
// Verify deletion.
- uint64 value;
+ uint64_t value;
DWORD size = sizeof(value);
if (key.ReadValue(
product_name.c_str(), &value, &size, NULL) == ERROR_SUCCESS) {
diff --git a/rlz/win/lib/rlz_value_store_registry.h b/rlz/win/lib/rlz_value_store_registry.h
index d058d66..4fa6db6 100644
--- a/rlz/win/lib/rlz_value_store_registry.h
+++ b/rlz/win/lib/rlz_value_store_registry.h
@@ -5,7 +5,11 @@
#ifndef RLZ_WIN_LIB_RLZ_VALUE_STORE_REGISTRY_H_
#define RLZ_WIN_LIB_RLZ_VALUE_STORE_REGISTRY_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "rlz/lib/rlz_value_store.h"
namespace rlz_lib {
@@ -17,8 +21,8 @@ class RlzValueStoreRegistry : public RlzValueStore {
bool HasAccess(AccessType type) override;
- bool WritePingTime(Product product, int64 time) override;
- bool ReadPingTime(Product product, int64* time) override;
+ bool WritePingTime(Product product, int64_t time) override;
+ bool ReadPingTime(Product product, int64_t* time) override;
bool ClearPingTime(Product product) override;
bool WriteAccessPointRlz(AccessPoint access_point,