summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-23 20:58:49 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-24 04:59:57 +0000
commit3131ce823077f310fed53187d7b4c671abe880d5 (patch)
tree952374940e6e5bb51bfba1bb5bb7393794e5761b /base/win
parent24d4c38787453eb834eba341d01c868667678aaf (diff)
downloadchromium_src-3131ce823077f310fed53187d7b4c671abe880d5.zip
chromium_src-3131ce823077f310fed53187d7b4c671abe880d5.tar.gz
chromium_src-3131ce823077f310fed53187d7b4c671abe880d5.tar.bz2
Switch to standard integer types in base/win/.
BUG=138542 TBR=cpu@chromium.org Review URL: https://codereview.chromium.org/1550493002 Cr-Commit-Position: refs/heads/master@{#366802}
Diffstat (limited to 'base/win')
-rw-r--r--base/win/event_trace_consumer.h4
-rw-r--r--base/win/event_trace_consumer_unittest.cc2
-rw-r--r--base/win/event_trace_controller.h3
-rw-r--r--base/win/event_trace_controller_unittest.cc1
-rw-r--r--base/win/event_trace_provider.h1
-rw-r--r--base/win/i18n.cc1
-rw-r--r--base/win/i18n.h1
-rw-r--r--base/win/i18n_unittest.cc2
-rw-r--r--base/win/iat_patch_function.h2
-rw-r--r--base/win/message_window.cc1
-rw-r--r--base/win/message_window.h2
-rw-r--r--base/win/metro.cc2
-rw-r--r--base/win/object_watcher.h1
-rw-r--r--base/win/pe_image.cc2
-rw-r--r--base/win/pe_image_unittest.cc1
-rw-r--r--base/win/registry.cc6
-rw-r--r--base/win/registry.h11
-rw-r--r--base/win/registry_unittest.cc9
-rw-r--r--base/win/resource_util.h2
-rw-r--r--base/win/scoped_bstr.cc6
-rw-r--r--base/win/scoped_bstr.h2
-rw-r--r--base/win/scoped_bstr_unittest.cc3
-rw-r--r--base/win/scoped_co_mem.h2
-rw-r--r--base/win/scoped_com_initializer.h2
-rw-r--r--base/win/scoped_handle.cc3
-rw-r--r--base/win/scoped_handle.h2
-rw-r--r--base/win/scoped_hdc.h2
-rw-r--r--base/win/scoped_hglobal.h3
-rw-r--r--base/win/scoped_process_information.h2
-rw-r--r--base/win/scoped_propvariant.h2
-rw-r--r--base/win/scoped_select_object.h2
-rw-r--r--base/win/scoped_variant.cc17
-rw-r--r--base/win/scoped_variant.h19
-rw-r--r--base/win/scoped_variant_unittest.cc14
-rw-r--r--base/win/shortcut.cc4
-rw-r--r--base/win/shortcut.h5
-rw-r--r--base/win/shortcut_unittest.cc5
-rw-r--r--base/win/startup_information.h3
-rw-r--r--base/win/startup_information_unittest.cc1
-rw-r--r--base/win/win_util.cc2
-rw-r--r--base/win/win_util.h1
-rw-r--r--base/win/win_util_unittest.cc2
-rw-r--r--base/win/windows_version.h4
43 files changed, 104 insertions, 58 deletions
diff --git a/base/win/event_trace_consumer.h b/base/win/event_trace_consumer.h
index fd44894..9f97e0d 100644
--- a/base/win/event_trace_consumer.h
+++ b/base/win/event_trace_consumer.h
@@ -9,8 +9,10 @@
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>
+#include <stddef.h>
#include <vector>
-#include "base/basictypes.h"
+
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/event_trace_consumer_unittest.cc b/base/win/event_trace_consumer_unittest.cc
index b159b93..8858aaf 100644
--- a/base/win/event_trace_consumer_unittest.cc
+++ b/base/win/event_trace_consumer_unittest.cc
@@ -9,11 +9,11 @@
#include <objbase.h>
-#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/process/process_handle.h"
#include "base/strings/stringprintf.h"
#include "base/win/event_trace_controller.h"
diff --git a/base/win/event_trace_controller.h b/base/win/event_trace_controller.h
index 69e755b..2e32b4c 100644
--- a/base/win/event_trace_controller.h
+++ b/base/win/event_trace_controller.h
@@ -23,10 +23,11 @@
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>
+#include <stddef.h>
#include <string>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/event_trace_controller_unittest.cc b/base/win/event_trace_controller_unittest.cc
index c128253..3eeeb88 100644
--- a/base/win/event_trace_controller_unittest.cc
+++ b/base/win/event_trace_controller_unittest.cc
@@ -11,6 +11,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/process/process_handle.h"
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
diff --git a/base/win/event_trace_provider.h b/base/win/event_trace_provider.h
index 0775faf..d550dd6 100644
--- a/base/win/event_trace_provider.h
+++ b/base/win/event_trace_provider.h
@@ -10,6 +10,7 @@
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>
+#include <stddef.h>
#include <stdint.h>
#include <limits>
diff --git a/base/win/i18n.cc b/base/win/i18n.cc
index a26e274..d7017e3 100644
--- a/base/win/i18n.cc
+++ b/base/win/i18n.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/logging.h"
+#include "base/macros.h"
namespace {
diff --git a/base/win/i18n.h b/base/win/i18n.h
index c0379c1..9e74d3f 100644
--- a/base/win/i18n.h
+++ b/base/win/i18n.h
@@ -9,7 +9,6 @@
#include <vector>
#include "base/base_export.h"
-#include "base/basictypes.h"
namespace base {
namespace win {
diff --git a/base/win/i18n_unittest.cc b/base/win/i18n_unittest.cc
index 781fc39..9af6dbf 100644
--- a/base/win/i18n_unittest.cc
+++ b/base/win/i18n_unittest.cc
@@ -6,6 +6,8 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include <stddef.h>
+
#include "base/win/i18n.h"
#include "base/win/windows_version.h"
diff --git a/base/win/iat_patch_function.h b/base/win/iat_patch_function.h
index 8be97f8..55c5930 100644
--- a/base/win/iat_patch_function.h
+++ b/base/win/iat_patch_function.h
@@ -8,7 +8,7 @@
#include <windows.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/message_window.cc b/base/win/message_window.cc
index 57fe64c..381b1b1 100644
--- a/base/win/message_window.cc
+++ b/base/win/message_window.cc
@@ -6,6 +6,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/process/memory.h"
#include "base/win/wrapped_window_proc.h"
diff --git a/base/win/message_window.h b/base/win/message_window.h
index ae0c6f0..950d03a 100644
--- a/base/win/message_window.h
+++ b/base/win/message_window.h
@@ -8,9 +8,9 @@
#include <windows.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/threading/non_thread_safe.h"
diff --git a/base/win/metro.cc b/base/win/metro.cc
index c3310c8..72975cd 100644
--- a/base/win/metro.cc
+++ b/base/win/metro.cc
@@ -4,6 +4,8 @@
#include "base/win/metro.h"
+#include <stddef.h>
+
#include "base/strings/string_util.h"
#include "base/win/windows_version.h"
diff --git a/base/win/object_watcher.h b/base/win/object_watcher.h
index f4d6085..3701d0f 100644
--- a/base/win/object_watcher.h
+++ b/base/win/object_watcher.h
@@ -9,6 +9,7 @@
#include "base/base_export.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
diff --git a/base/win/pe_image.cc b/base/win/pe_image.cc
index e67eb08..984e27d 100644
--- a/base/win/pe_image.cc
+++ b/base/win/pe_image.cc
@@ -5,6 +5,8 @@
// This file implements PEImage, a generic class to manipulate PE files.
// This file was adapted from GreenBorder's Code.
+#include <stddef.h>
+
#include "base/win/pe_image.h"
namespace base {
diff --git a/base/win/pe_image_unittest.cc b/base/win/pe_image_unittest.cc
index 92510bf..e20af22 100644
--- a/base/win/pe_image_unittest.cc
+++ b/base/win/pe_image_unittest.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/win/pe_image.h"
+#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
diff --git a/base/win/registry.cc b/base/win/registry.cc
index 5d75c96..ee7b8cd 100644
--- a/base/win/registry.cc
+++ b/base/win/registry.cc
@@ -5,9 +5,11 @@
#include "base/win/registry.h"
#include <shlwapi.h>
+#include <stddef.h>
#include <algorithm>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_restrictions.h"
#include "base/win/windows_version.h"
@@ -301,10 +303,10 @@ LONG RegKey::ReadValueDW(const wchar_t* name, DWORD* out_value) const {
return result;
}
-LONG RegKey::ReadInt64(const wchar_t* name, int64* out_value) const {
+LONG RegKey::ReadInt64(const wchar_t* name, int64_t* out_value) const {
DCHECK(out_value);
DWORD type = REG_QWORD;
- int64 local_value = 0;
+ int64_t local_value = 0;
DWORD size = sizeof(local_value);
LONG result = ReadValue(name, &local_value, &size, &type);
if (result == ERROR_SUCCESS) {
diff --git a/base/win/registry.h b/base/win/registry.h
index 83f354d..1285be0 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -6,11 +6,12 @@
#define BASE_WIN_REGISTRY_H_
#include <windows.h>
+#include <stdint.h>
#include <string>
#include <vector>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/win/object_watcher.h"
#include "base/win/scoped_handle.h"
@@ -84,13 +85,13 @@ class BASE_EXPORT RegKey {
// Getters:
- // Returns an int32 value. If |name| is NULL or empty, returns the default
+ // Returns an int32_t value. If |name| is NULL or empty, returns the default
// value, if any.
LONG ReadValueDW(const wchar_t* name, DWORD* out_value) const;
- // Returns an int64 value. If |name| is NULL or empty, returns the default
+ // Returns an int64_t value. If |name| is NULL or empty, returns the default
// value, if any.
- LONG ReadInt64(const wchar_t* name, int64* out_value) const;
+ LONG ReadInt64(const wchar_t* name, int64_t* out_value) const;
// Returns a string value. If |name| is NULL or empty, returns the default
// value, if any.
@@ -110,7 +111,7 @@ class BASE_EXPORT RegKey {
// Setters:
- // Sets an int32 value.
+ // Sets an int32_t value.
LONG WriteValue(const wchar_t* name, DWORD in_value);
// Sets a string value.
diff --git a/base/win/registry_unittest.cc b/base/win/registry_unittest.cc
index 0b87023..08d5d48 100644
--- a/base/win/registry_unittest.cc
+++ b/base/win/registry_unittest.cc
@@ -4,11 +4,14 @@
#include "base/win/registry.h"
+#include <stdint.h>
+
#include <cstring>
#include <vector>
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
@@ -86,7 +89,7 @@ TEST_F(RegistryTest, ValueTest) {
const wchar_t kInt64ValueName[] = L"Int64Value";
const wchar_t kStringData[] = L"string data";
const DWORD kDWORDData = 0xdeadbabe;
- const int64 kInt64Data = 0xdeadbabedeadbabeLL;
+ const int64_t kInt64Data = 0xdeadbabedeadbabeLL;
// Test value creation
ASSERT_EQ(ERROR_SUCCESS, key.WriteValue(kStringValueName, kStringData));
@@ -101,7 +104,7 @@ TEST_F(RegistryTest, ValueTest) {
// Test Read
std::wstring string_value;
DWORD dword_value = 0;
- int64 int64_value = 0;
+ int64_t int64_value = 0;
ASSERT_EQ(ERROR_SUCCESS, key.ReadValue(kStringValueName, &string_value));
ASSERT_EQ(ERROR_SUCCESS, key.ReadValueDW(kDWORDValueName, &dword_value));
ASSERT_EQ(ERROR_SUCCESS, key.ReadInt64(kInt64ValueName, &int64_value));
@@ -166,7 +169,7 @@ TEST_F(RegistryTest, TruncatedCharTest) {
const wchar_t kName[] = L"name";
// kData size is not a multiple of sizeof(wchar_t).
- const uint8 kData[] = { 1, 2, 3, 4, 5 };
+ const uint8_t kData[] = {1, 2, 3, 4, 5};
EXPECT_EQ(5u, arraysize(kData));
ASSERT_EQ(ERROR_SUCCESS, key.WriteValue(kName, kData,
arraysize(kData), REG_BINARY));
diff --git a/base/win/resource_util.h b/base/win/resource_util.h
index 8a8baa0..00687b9 100644
--- a/base/win/resource_util.h
+++ b/base/win/resource_util.h
@@ -9,9 +9,9 @@
#define BASE_WIN_RESOURCE_UTIL_H_
#include <windows.h>
+#include <stddef.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
namespace base {
namespace win {
diff --git a/base/win/scoped_bstr.cc b/base/win/scoped_bstr.cc
index 298318db..02f3d54 100644
--- a/base/win/scoped_bstr.cc
+++ b/base/win/scoped_bstr.cc
@@ -4,6 +4,8 @@
#include "base/win/scoped_bstr.h"
+#include <stdint.h>
+
#include "base/logging.h"
namespace base {
@@ -55,8 +57,8 @@ BSTR ScopedBstr::AllocateBytes(size_t bytes) {
void ScopedBstr::SetByteLen(size_t bytes) {
DCHECK(bstr_ != NULL) << "attempting to modify a NULL bstr";
- uint32* data = reinterpret_cast<uint32*>(bstr_);
- data[-1] = static_cast<uint32>(bytes);
+ uint32_t* data = reinterpret_cast<uint32_t*>(bstr_);
+ data[-1] = static_cast<uint32_t>(bytes);
}
size_t ScopedBstr::Length() const {
diff --git a/base/win/scoped_bstr.h b/base/win/scoped_bstr.h
index 7c9f5df..413fb28 100644
--- a/base/win/scoped_bstr.h
+++ b/base/win/scoped_bstr.h
@@ -7,9 +7,11 @@
#include <windows.h>
#include <oleauto.h>
+#include <stddef.h>
#include "base/base_export.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string16.h"
namespace base {
diff --git a/base/win/scoped_bstr_unittest.cc b/base/win/scoped_bstr_unittest.cc
index 9a289ff..d305e5a 100644
--- a/base/win/scoped_bstr_unittest.cc
+++ b/base/win/scoped_bstr_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/win/scoped_bstr.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/win/scoped_co_mem.h b/base/win/scoped_co_mem.h
index fc85114..a3737dd 100644
--- a/base/win/scoped_co_mem.h
+++ b/base/win/scoped_co_mem.h
@@ -7,8 +7,8 @@
#include <objbase.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/scoped_com_initializer.h b/base/win/scoped_com_initializer.h
index 92228ba..8efff85 100644
--- a/base/win/scoped_com_initializer.h
+++ b/base/win/scoped_com_initializer.h
@@ -7,8 +7,8 @@
#include <objbase.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "build/build_config.h"
namespace base {
diff --git a/base/win/scoped_handle.cc b/base/win/scoped_handle.cc
index 2ebef32..39b5933 100644
--- a/base/win/scoped_handle.cc
+++ b/base/win/scoped_handle.cc
@@ -4,12 +4,15 @@
#include "base/win/scoped_handle.h"
+#include <stddef.h>
+
#include <unordered_map>
#include "base/debug/alias.h"
#include "base/hash.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/synchronization/lock_impl.h"
extern "C" {
diff --git a/base/win/scoped_handle.h b/base/win/scoped_handle.h
index 3e8a748..404ab66 100644
--- a/base/win/scoped_handle.h
+++ b/base/win/scoped_handle.h
@@ -8,9 +8,9 @@
#include <windows.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/move.h"
// TODO(rvargas): remove this with the rest of the verifier.
diff --git a/base/win/scoped_hdc.h b/base/win/scoped_hdc.h
index 2452067..fa686dd 100644
--- a/base/win/scoped_hdc.h
+++ b/base/win/scoped_hdc.h
@@ -7,8 +7,8 @@
#include <windows.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/win/scoped_handle.h"
namespace base {
diff --git a/base/win/scoped_hglobal.h b/base/win/scoped_hglobal.h
index 185ccbd..abe9a5a 100644
--- a/base/win/scoped_hglobal.h
+++ b/base/win/scoped_hglobal.h
@@ -6,8 +6,9 @@
#define BASE_WIN_SCOPED_HGLOBAL_H_
#include <windows.h>
+#include <stddef.h>
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/scoped_process_information.h b/base/win/scoped_process_information.h
index 2e24054..01df861 100644
--- a/base/win/scoped_process_information.h
+++ b/base/win/scoped_process_information.h
@@ -7,8 +7,8 @@
#include <windows.h>
-#include "base/basictypes.h"
#include "base/base_export.h"
+#include "base/macros.h"
#include "base/win/scoped_handle.h"
namespace base {
diff --git a/base/win/scoped_propvariant.h b/base/win/scoped_propvariant.h
index 62cc6a6..aa9afec 100644
--- a/base/win/scoped_propvariant.h
+++ b/base/win/scoped_propvariant.h
@@ -7,8 +7,8 @@
#include <propidl.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/scoped_select_object.h b/base/win/scoped_select_object.h
index 347de79..59b21c1 100644
--- a/base/win/scoped_select_object.h
+++ b/base/win/scoped_select_object.h
@@ -7,8 +7,8 @@
#include <windows.h>
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/scoped_variant.cc b/base/win/scoped_variant.cc
index 4a1ad90..0c1ee31 100644
--- a/base/win/scoped_variant.cc
+++ b/base/win/scoped_variant.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/win/scoped_variant.h"
+
#include "base/logging.h"
namespace base {
@@ -117,49 +118,49 @@ void ScopedVariant::Set(const wchar_t* str) {
var_.bstrVal = ::SysAllocString(str);
}
-void ScopedVariant::Set(int8 i8) {
+void ScopedVariant::Set(int8_t i8) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_I1;
var_.cVal = i8;
}
-void ScopedVariant::Set(uint8 ui8) {
+void ScopedVariant::Set(uint8_t ui8) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_UI1;
var_.bVal = ui8;
}
-void ScopedVariant::Set(int16 i16) {
+void ScopedVariant::Set(int16_t i16) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_I2;
var_.iVal = i16;
}
-void ScopedVariant::Set(uint16 ui16) {
+void ScopedVariant::Set(uint16_t ui16) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_UI2;
var_.uiVal = ui16;
}
-void ScopedVariant::Set(int32 i32) {
+void ScopedVariant::Set(int32_t i32) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_I4;
var_.lVal = i32;
}
-void ScopedVariant::Set(uint32 ui32) {
+void ScopedVariant::Set(uint32_t ui32) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_UI4;
var_.ulVal = ui32;
}
-void ScopedVariant::Set(int64 i64) {
+void ScopedVariant::Set(int64_t i64) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_I8;
var_.llVal = i64;
}
-void ScopedVariant::Set(uint64 ui64) {
+void ScopedVariant::Set(uint64_t ui64) {
DCHECK(!IsLeakableVarType(var_.vt)) << "leaking variant: " << var_.vt;
var_.vt = VT_UI8;
var_.ullVal = ui64;
diff --git a/base/win/scoped_variant.h b/base/win/scoped_variant.h
index 322fcf7..16d43f9 100644
--- a/base/win/scoped_variant.h
+++ b/base/win/scoped_variant.h
@@ -7,9 +7,10 @@
#include <windows.h>
#include <oleauto.h>
+#include <stdint.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace base {
namespace win {
@@ -90,14 +91,14 @@ class BASE_EXPORT ScopedVariant {
void Set(const wchar_t* str);
// Setters for simple types.
- void Set(int8 i8);
- void Set(uint8 ui8);
- void Set(int16 i16);
- void Set(uint16 ui16);
- void Set(int32 i32);
- void Set(uint32 ui32);
- void Set(int64 i64);
- void Set(uint64 ui64);
+ void Set(int8_t i8);
+ void Set(uint8_t ui8);
+ void Set(int16_t i16);
+ void Set(uint16_t ui16);
+ void Set(int32_t i32);
+ void Set(uint32_t ui32);
+ void Set(int64_t i64);
+ void Set(uint64_t ui64);
void Set(float r32);
void Set(double r64);
void Set(bool b);
diff --git a/base/win/scoped_variant_unittest.cc b/base/win/scoped_variant_unittest.cc
index 48f08bb..7d61e28 100644
--- a/base/win/scoped_variant_unittest.cc
+++ b/base/win/scoped_variant_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
#include "base/win/scoped_variant.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -126,7 +128,7 @@ TEST(ScopedVariantTest, ScopedVariant) {
// need to be freed explicitly).
// We need static cast here since char defaults to int (!?).
- var.Set(static_cast<int8>('v'));
+ var.Set(static_cast<int8_t>('v'));
EXPECT_EQ(VT_I1, var.type());
EXPECT_EQ('v', V_I1(var.ptr()));
@@ -134,15 +136,15 @@ TEST(ScopedVariantTest, ScopedVariant) {
EXPECT_EQ(VT_I2, var.type());
EXPECT_EQ(123, V_I2(var.ptr()));
- var.Set(static_cast<int32>(123));
+ var.Set(static_cast<int32_t>(123));
EXPECT_EQ(VT_I4, var.type());
EXPECT_EQ(123, V_I4(var.ptr()));
- var.Set(static_cast<int64>(123));
+ var.Set(static_cast<int64_t>(123));
EXPECT_EQ(VT_I8, var.type());
EXPECT_EQ(123, V_I8(var.ptr()));
- var.Set(static_cast<uint8>(123));
+ var.Set(static_cast<uint8_t>(123));
EXPECT_EQ(VT_UI1, var.type());
EXPECT_EQ(123u, V_UI1(var.ptr()));
@@ -150,11 +152,11 @@ TEST(ScopedVariantTest, ScopedVariant) {
EXPECT_EQ(VT_UI2, var.type());
EXPECT_EQ(123u, V_UI2(var.ptr()));
- var.Set(static_cast<uint32>(123));
+ var.Set(static_cast<uint32_t>(123));
EXPECT_EQ(VT_UI4, var.type());
EXPECT_EQ(123u, V_UI4(var.ptr()));
- var.Set(static_cast<uint64>(123));
+ var.Set(static_cast<uint64_t>(123));
EXPECT_EQ(VT_UI8, var.type());
EXPECT_EQ(123u, V_UI8(var.ptr()));
diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc
index ccfa2f5..5621b94 100644
--- a/base/win/shortcut.cc
+++ b/base/win/shortcut.cc
@@ -183,7 +183,7 @@ bool CreateOrUpdateShortcutLink(const FilePath& shortcut_path,
}
bool ResolveShortcutProperties(const FilePath& shortcut_path,
- uint32 options,
+ uint32_t options,
ShortcutProperties* properties) {
DCHECK(options && properties);
base::ThreadRestrictions::AssertIOAllowed();
@@ -296,7 +296,7 @@ bool ResolveShortcutProperties(const FilePath& shortcut_path,
bool ResolveShortcut(const FilePath& shortcut_path,
FilePath* target_path,
string16* args) {
- uint32 options = 0;
+ uint32_t options = 0;
if (target_path)
options |= ShortcutProperties::PROPERTIES_TARGET;
if (args)
diff --git a/base/win/shortcut.h b/base/win/shortcut.h
index a41cc3d..c592b28 100644
--- a/base/win/shortcut.h
+++ b/base/win/shortcut.h
@@ -6,6 +6,7 @@
#define BASE_WIN_SHORTCUT_H_
#include <windows.h>
+#include <stdint.h>
#include "base/base_export.h"
#include "base/files/file_path.h"
@@ -113,7 +114,7 @@ struct BASE_EXPORT ShortcutProperties {
bool dual_mode;
// Bitfield made of IndividualProperties. Properties set in |options| will be
// set on the shortcut, others will be ignored.
- uint32 options;
+ uint32_t options;
};
// This method creates (or updates) a shortcut link at |shortcut_path| using the
@@ -138,7 +139,7 @@ BASE_EXPORT bool CreateOrUpdateShortcutLink(
// properties are successfully read. Otherwise some reads have failed and
// intermediate values written to |properties| should be ignored.
BASE_EXPORT bool ResolveShortcutProperties(const FilePath& shortcut_path,
- uint32 options,
+ uint32_t options,
ShortcutProperties* properties);
// Resolves Windows shortcut (.LNK file).
diff --git a/base/win/shortcut_unittest.cc b/base/win/shortcut_unittest.cc
index 794be23..c1ebcf1 100644
--- a/base/win/shortcut_unittest.cc
+++ b/base/win/shortcut_unittest.cc
@@ -4,11 +4,14 @@
#include "base/win/shortcut.h"
+#include <stdint.h>
+
#include <string>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
#include "base/test/test_file_util.h"
#include "base/test/test_shortcut_win.h"
#include "base/win/scoped_com_initializer.h"
@@ -80,7 +83,7 @@ class ShortcutTest : public testing::Test {
} // namespace
TEST_F(ShortcutTest, CreateAndResolveShortcutProperties) {
- uint32 valid_properties = ShortcutProperties::PROPERTIES_BASIC;
+ uint32_t valid_properties = ShortcutProperties::PROPERTIES_BASIC;
if (GetVersion() >= VERSION_WIN7)
valid_properties |= ShortcutProperties::PROPERTIES_WIN7;
diff --git a/base/win/startup_information.h b/base/win/startup_information.h
index 66c287f..5b777ba 100644
--- a/base/win/startup_information.h
+++ b/base/win/startup_information.h
@@ -6,9 +6,10 @@
#define BASE_WIN_STARTUP_INFORMATION_H_
#include <windows.h>
+#include <stddef.h>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
namespace base {
namespace win {
diff --git a/base/win/startup_information_unittest.cc b/base/win/startup_information_unittest.cc
index 36c6e84..5002a22 100644
--- a/base/win/startup_information_unittest.cc
+++ b/base/win/startup_information_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <windows.h>
+#include <stddef.h>
#include <string>
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 93ec543..9e90d10 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -17,12 +17,14 @@
#include <sddl.h>
#include <setupapi.h>
#include <signal.h>
+#include <stddef.h>
#include <stdlib.h>
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
diff --git a/base/win/win_util.h b/base/win/win_util.h
index c1249d9..78a0608 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -23,6 +23,7 @@
#define BASE_WIN_WIN_UTIL_H_
#include <windows.h>
+#include <stdint.h>
#include <string>
diff --git a/base/win/win_util_unittest.cc b/base/win/win_util_unittest.cc
index 24141cd..c121d7c 100644
--- a/base/win/win_util_unittest.cc
+++ b/base/win/win_util_unittest.cc
@@ -4,7 +4,7 @@
#include <windows.h>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/strings/string_util.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
diff --git a/base/win/windows_version.h b/base/win/windows_version.h
index a52e64e..c9bbd4f 100644
--- a/base/win/windows_version.h
+++ b/base/win/windows_version.h
@@ -5,10 +5,12 @@
#ifndef BASE_WIN_WINDOWS_VERSION_H_
#define BASE_WIN_WINDOWS_VERSION_H_
+#include <stddef.h>
+
#include <string>
#include "base/base_export.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
typedef void* HANDLE;