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}
This commit is contained in:
@ -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) &&
|
||||
|
@ -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,
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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 };
|
||||
|
@ -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[];
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -12,6 +12,7 @@
|
||||
#ifndef RLZ_LIB_RLZ_LIB_H_
|
||||
#define RLZ_LIB_RLZ_LIB_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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,
|
||||
|
@ -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];
|
||||
|
@ -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());
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user