0

format windows headers using new config.

Test new config:
https://chromium-review.googlesource.com/c/chromium/src/+/5197064

by applying clang-format on every problematic windows headers.

This CL is cloned from https://crrev.com/c/5366045.

Script:
-------

```
function replace {
    echo "Replacing $1 by $2"
    git grep -l "$1" \
        | cut -f1 -d: \
        | grep \
              -e "\.h" \
              -e "\.cc" \
        | grep -v "third_party/[^b]" \
        | sort \
        | uniq \
        | xargs sed -i "s/$1/$2/gi"
}

git checkout origin/main
git branch -D change-5197064 || true

git new-branch change-5197064
replace "#include <\(initguid|mmdeviceapi\|windows\|winsock2\|ws2tcpip\|shobjidl\|atlbase\|ole2\|unknwn\|objbase\|tchar\).h>" ""
replace "#include \"base\\/win\\/atl.h\"" ""
replace "#include <uiautomation.*>" ""
git add -u
git commit -m "remove problematic windows headers"
git revert HEAD --no-commit
git add -u
git commit -m "add problematic windows headers"
git cl format --upstream=HEAD~
git add -u
git commit -m "format"

git cl issue 5367127
git cl upload -df --bypass-hook
```

Also removed some unnecessary comments.

Bug: 329138753
Change-Id: I161c28ea2d27c569825e0c789a4c143530937f58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367127
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287420}
This commit is contained in:
Takuto Ikuta
2024-04-15 16:59:19 +00:00
committed by Chromium LUCI CQ
parent 588651e442
commit c8d6b16f02
520 changed files with 952 additions and 524 deletions
.clang-format
base
allocator
base_paths_win.cc
debug
files
logging.cc
memory
process
profiler
synchronization
system
task
test
threading
time
trace_event
win
chrome
app
browser
accessibility
apps
component_updater
device_reauth
download
enterprise
extensions
first_run
google
icon_loader_win.cc
importer
media
media_galleries
memory_details_win.cc
net
notifications
policy
printing
process_singleton_win.cc
profile_resetter
safe_browsing
shell_integration_win.cc
task_manager
taskbar
ui
win
chrome_elf
common
credential_provider
elevation_service
install_static
installer
services
test
updater
utility
components
content
device
extensions/browser/api/system_cpu
gpu/command_buffer/service
ipc
media
mojo
native_client_sdk/src/libraries/nacl_io
net
ppapi/tests
printing
remoting
rlz/win/lib
sandbox
services
skia/ext
third_party/blink/renderer
tools
ui
accessibility
aura
base
compositor
display
events
gfx
gl
native_theme
platform_window
views

@ -46,7 +46,7 @@ IncludeCategories:
Priority: 5
# ref: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#includeismainregex
IncludeIsMainRegex: "\
(_(android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|nacl|openbsd|posix|stubs?|win))?\
(_(32|64|android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|nacl|openbsd|posix|stubs?|win))?\
(_(unit|browser|perf)?tests?)?$"
# Make sure code like:

@ -16,6 +16,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/win/windows_version.h"
#endif

@ -4,15 +4,16 @@
#include "partition_alloc/partition_alloc_base/debug/stack_trace.h"
#include <windows.h>
#include <psapi.h>
#include <algorithm>
#include "partition_alloc/partition_alloc_base/logging.h"
#include "partition_alloc/partition_alloc_base/process/process_handle.h"
#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h"
#include <windows.h>
#include <algorithm>
#include <psapi.h> // Depends on "windows.h"
namespace partition_alloc::internal::base::debug {
namespace {

@ -25,10 +25,9 @@
#include "partition_alloc/partition_alloc_base/strings/stringprintf.h"
#if BUILDFLAG(IS_WIN)
#include <io.h>
#include <windows.h>
#include <io.h>
#endif
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)

@ -22,10 +22,9 @@
#include <algorithm>
#if BUILDFLAG(IS_WIN)
#include <io.h>
#include <windows.h>
#include <io.h>
#endif
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)

@ -44,6 +44,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "wow64apiset.h"
#endif

@ -23,8 +23,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_WIN)
#include <malloc.h>
#include <windows.h>
#include <malloc.h>
#elif BUILDFLAG(IS_APPLE)
#include <malloc/malloc.h>

@ -8,9 +8,10 @@
#include "partition_alloc/shim/winheap_stubs_win.h"
#include <windows.h>
#include <malloc.h>
#include <new.h>
#include <windows.h>
#include <algorithm>
#include <bit>

@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/base_paths.h"
#include <windows.h>
#include <KnownFolders.h>
#include <shlobj.h>
#include "base/base_paths.h"
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/path_service.h"

@ -4,9 +4,10 @@
#include "base/debug/debugger.h"
#include <stdlib.h>
#include <windows.h>
#include <stdlib.h>
namespace base {
namespace debug {

@ -3,10 +3,11 @@
// found in the LICENSE file.
#include "base/debug/gdi_debug_util_win.h"
#include <windows.h>
#include <TlHelp32.h>
#include <psapi.h>
#include <stddef.h>
#include <windows.h>
#include <winternl.h>
#include <algorithm>

@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/debug/gdi_debug_util_win.h"
#include <windows.h>
#include "base/debug/gdi_debug_util_win.h"
#include "base/win/scoped_hdc.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -4,9 +4,10 @@
#include "base/debug/invalid_access_win.h"
#include <windows.h>
#include <intrin.h>
#include <stdlib.h>
#include <windows.h>
#include "base/check.h"
#include "build/build_config.h"

@ -28,6 +28,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/win/win_util.h"
#elif BUILDFLAG(IS_APPLE)
#include <CoreFoundation/CoreFoundation.h>

@ -52,10 +52,12 @@
#include "testing/platform_test.h"
#if BUILDFLAG(IS_WIN)
#include <shellapi.h>
#include <shlobj.h>
#include <tchar.h>
#include <windows.h>
#include <shellapi.h>
#include <shlobj.h>
#include "base/scoped_native_library.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/file_path_reparse_point_win.h"

@ -5,6 +5,7 @@
#include "base/files/file_util.h"
#include <windows.h>
#include <winsock2.h>
#include <io.h>
#include <psapi.h>
@ -13,7 +14,6 @@
#include <stddef.h>
#include <stdint.h>
#include <time.h>
#include <winsock2.h>
#include <algorithm>
#include <limits>

@ -4,6 +4,8 @@
#include "base/files/file.h"
#include <windows.h>
#include <io.h>
#include <stdint.h>
@ -17,8 +19,6 @@
#include "base/strings/string_util.h"
#include "base/threading/scoped_blocking_call.h"
#include <windows.h>
namespace base {
// Make sure our Whence mappings match the system headers.

@ -65,9 +65,10 @@
#endif // defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)
#if BUILDFLAG(IS_WIN)
#include <io.h>
#include <windows.h>
#include <io.h>
#include "base/win/win_util.h"
typedef HANDLE FileHandle;

@ -32,6 +32,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/win/windows_version.h"
#endif

@ -24,6 +24,7 @@
#include "base/debug/proc_maps_linux.h"
#elif BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/logging.h"
#elif BUILDFLAG(IS_FUCHSIA)
#include <lib/zx/object.h>

@ -4,13 +4,13 @@
#include "base/process/kill.h"
#include <algorithm>
#include <windows.h>
#include <io.h>
#include <stdint.h>
#include <algorithm>
#include "base/logging.h"
#include "base/notreached.h"
#include "base/process/memory.h"

@ -5,7 +5,9 @@
#include "base/process/process_handle.h"
#include <windows.h>
#include <winternl.h>
#include <ostream>
#include "base/check.h"

@ -40,9 +40,9 @@
#endif // BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_WIN)
#include "base/win/base_win_buildflags.h"
#include <windows.h>
#include "base/win/base_win_buildflags.h"
#endif
namespace {

@ -4,6 +4,8 @@
#include "base/process/process.h"
#include <windows.h>
#include "base/clang_profiling_buildflags.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
@ -12,8 +14,6 @@
#include "base/trace_event/base_tracing.h"
#include "base/win/windows_version.h"
#include <windows.h>
#if BUILDFLAG(CLANG_PROFILING)
#include "base/test/clang_profiling.h"
#endif

@ -5,6 +5,7 @@
#include "base/profiler/module_cache.h"
#include <objbase.h>
#include <psapi.h>
#include <string>

@ -39,9 +39,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include <intrin.h>
#include <malloc.h>
#include <windows.h>
#else
#include <alloca.h>
#endif

@ -5,6 +5,7 @@
#include "base/profiler/suspendable_thread_delegate_win.h"
#include <windows.h>
#include <winternl.h>
#include <vector>

@ -6,6 +6,7 @@
#define BASE_PROFILER_SUSPENDABLE_THREAD_DELEGATE_WIN_H_
#include <windows.h>
#include <memory>
#include <vector>

@ -4,12 +4,12 @@
#include "base/synchronization/waitable_event_watcher.h"
#include <windows.h>
#include "base/compiler_specific.h"
#include "base/synchronization/waitable_event.h"
#include "base/win/object_watcher.h"
#include <windows.h>
namespace base {
WaitableEventWatcher::WaitableEventWatcher() = default;

@ -4,9 +4,10 @@
#include "base/synchronization/waitable_event.h"
#include <stddef.h>
#include <windows.h>
#include <stddef.h>
#include <algorithm>
#include <optional>
#include <utility>

@ -4,9 +4,10 @@
#include "base/system/sys_info.h"
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
#include <windows.h>
#include <algorithm>
#include <bit>

@ -48,13 +48,13 @@
#endif
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/message_loop/message_pump_win.h"
#include "base/process/memory.h"
#include "base/win/current_module.h"
#include "base/win/message_window.h"
#include "base/win/scoped_handle.h"
#include <windows.h>
#endif
using ::testing::IsNull;

@ -5,6 +5,7 @@
#include "base/test/file_path_reparse_point_win.h"
#include <windows.h>
#include <winioctl.h>
#include <utility>

@ -79,10 +79,10 @@
#endif
#if BUILDFLAG(IS_WIN)
#include "base/strings/string_util_win.h"
#include <windows.h>
#include "base/strings/string_util_win.h"
// To avoid conflicts with the macro from the Windows SDK...
#undef GetCommandLine
#endif

@ -4,10 +4,11 @@
#include "base/test/test_file_util.h"
#include <windows.h>
#include <aclapi.h>
#include <stddef.h>
#include <wchar.h>
#include <windows.h>
#include <memory>

@ -5,6 +5,7 @@
#include "base/test/test_file_util.h"
#include <windows.h>
#include <string>
#include "base/files/file_path.h"

@ -4,9 +4,10 @@
#include "base/test/test_reg_util_win.h"
#include <stdint.h>
#include <windows.h>
#include <stdint.h>
#include <string_view>
#include "base/memory/ptr_util.h"

@ -4,11 +4,12 @@
#include "base/test/test_shortcut_win.h"
#include <objbase.h>
#include <windows.h>
#include <objbase.h>
#include <shlobj.h>
#include <propkey.h>
#include <shlobj.h>
#include <wrl/client.h>
#include <string>

@ -20,6 +20,7 @@
#include "base/threading/platform_thread_internal_posix.h"
#elif BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/threading/platform_thread_win.h"
#endif

@ -4,6 +4,8 @@
#include "base/threading/platform_thread_win.h"
#include <windows.h>
#include <stddef.h>
#include <string>
@ -29,8 +31,6 @@
#include "build/build_config.h"
#include "partition_alloc/partition_alloc_buildflags.h"
#include <windows.h>
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
#include "partition_alloc/stack/stack.h"
#endif

@ -22,6 +22,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/win/windows_types.h"
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#include <pthread.h>

@ -33,11 +33,11 @@
#include "base/time/time.h"
#include <windows.foundation.h>
#include <windows.h>
#include <mmsystem.h>
#include <stdint.h>
#include <windows.foundation.h>
#include <atomic>
#include <ostream>

@ -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 "base/time/time.h"
#include <windows.h>
#include <mmsystem.h>
@ -16,7 +18,6 @@
#include "base/strings/string_piece.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "base/win/registry.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -23,6 +23,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "winbase.h"
#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#include <sys/mman.h>

@ -23,10 +23,11 @@
* logging like TraceLoggingProvider.h.
*/
#include <stdint.h>
#include <windows.h>
// Evntprov.h must come after windows.h.
#include <evntprov.h>
#include <stdint.h>
#include <cstdint>
// TODO(joel@microsoft.com) Update headers and use defined constants instead
// of magic numbers after crbug.com/1089996 is resolved.

@ -4,9 +4,10 @@
#include "base/win/access_control_list.h"
#include <aclapi.h>
#include <windows.h>
#include <aclapi.h>
#include <utility>
#include <vector>

@ -6,6 +6,7 @@
#define BASE_WIN_ASYNC_OPERATION_H_
#include <unknwn.h>
#include <windows.foundation.h>
#include <wrl/async.h>
#include <wrl/client.h>

@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/win/com_init_balancer.h"
#include <objbase.h>
#include "base/check_op.h"
#include "base/win/com_init_balancer.h"
namespace base {
namespace win {

@ -4,9 +4,10 @@
#include "base/win/com_init_check_hook.h"
#include <objbase.h>
#include <windows.h>
#include <objbase.h>
#include <stdint.h>
#include <string.h>

@ -5,6 +5,7 @@
#include "base/win/com_init_check_hook.h"
#include <objbase.h>
#include <shlobj.h>
#include <wrl/client.h>

@ -4,8 +4,9 @@
#include "base/win/com_init_util.h"
#include <stdint.h>
#include <windows.h>
#include <stdint.h>
#include <winternl.h>
#include "base/logging.h"

@ -5,6 +5,7 @@
#include "base/win/default_apps_util.h"
#include <shobjidl.h>
#include <wrl/client.h>
#include <string_view>

@ -4,6 +4,8 @@
//
// Unit tests for event trace controller.
#include "base/win/event_trace_controller.h"
#include <objbase.h>
#include <initguid.h> // NOLINT - has to be last
@ -16,7 +18,6 @@
#include "base/strings/string_number_conversions_win.h"
#include "base/strings/string_util.h"
#include "base/system/sys_info.h"
#include "base/win/event_trace_controller.h"
#include "base/win/event_trace_provider.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -10,7 +10,6 @@
#include <string_view>
#include "base/check_op.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"

@ -5,9 +5,10 @@
#ifndef BASE_WIN_PE_IMAGE_READER_H_
#define BASE_WIN_PE_IMAGE_READER_H_
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
#include <windows.h>
#include <memory>

@ -2,16 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/win/pe_image_reader.h"
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
#include <windows.h>
#include <wintrust.h>
#include "base/files/file_path.h"
#include "base/files/memory_mapped_file.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/win/pe_image_reader.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

@ -6,6 +6,7 @@
#define BASE_WIN_POST_ASYNC_RESULTS_H_
#include <unknwn.h>
#include <windows.foundation.h>
#include <wrl/async.h>
#include <wrl/client.h>

@ -6,6 +6,7 @@
#define BASE_WIN_SCOPED_COM_INITIALIZER_H_
#include <objbase.h>
#include <wrl/client.h>
#include "base/base_export.h"

@ -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 "base/win/scoped_handle.h"
#include <windows.h>
#include <winternl.h>
@ -14,7 +16,6 @@
#include "base/scoped_native_library.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
#include "base/win/scoped_handle.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"

@ -4,9 +4,10 @@
#include "base/win/security_descriptor.h"
#include <windows.h>
#include <aclapi.h>
#include <sddl.h>
#include <windows.h>
#include <optional>
#include <string>

@ -5,6 +5,7 @@
#include "base/win/security_util.h"
#include <windows.h>
#include <winternl.h>
#include <optional>

@ -5,6 +5,7 @@
#include "base/win/shortcut.h"
#include <objbase.h>
#include <propkey.h>
#include <shlobj.h>
#include <wrl/client.h>

@ -6,6 +6,7 @@
#define BASE_WIN_VARIANT_VECTOR_H_
#include <objbase.h>
#include <oleauto.h>
#include <type_traits>

@ -4,13 +4,17 @@
#include "base/win/win_util.h"
#include <objbase.h>
#include <initguid.h>
#include <shobjidl.h>
#include <tchar.h>
#include <aclapi.h>
#include <cfgmgr32.h>
#include <initguid.h>
#include <inspectable.h>
#include <lm.h>
#include <mdmregistration.h>
#include <objbase.h>
#include <powrprof.h>
#include <propkey.h>
#include <psapi.h>
@ -18,12 +22,10 @@
#include <sddl.h>
#include <setupapi.h>
#include <shellscalingapi.h>
#include <shobjidl.h> // Must be before propkey.
#include <signal.h>
#include <stddef.h>
#include <stdlib.h>
#include <strsafe.h>
#include <tchar.h> // Must be before tpcshrd.h or for any use of _T macro
#include <tpcshrd.h>
#include <uiviewsettingsinterop.h>
#include <windows.ui.viewmanagement.h>

@ -4,9 +4,10 @@
#include "base/win/wmi.h"
#include <objbase.h>
#include <windows.h>
#include <objbase.h>
#include <stdint.h>
#include <string_view>

@ -4,11 +4,11 @@
#include "chrome/app/chrome_exe_main_win.h"
#include <tchar.h>
#include <windows.h>
#include <malloc.h>
#include <stddef.h>
#include <tchar.h>
#include <algorithm>
#include <array>

@ -5,6 +5,7 @@
#include "chrome/app/main_dll_loader_win.h"
#include <windows.h> // NOLINT
#include <stddef.h>
#include <stdint.h>
#include <userenv.h> // NOLINT

@ -5,6 +5,7 @@
#include "chrome/browser/accessibility/caption_settings_dialog.h"
#include <windows.h>
#include <shellapi.h>
#include "base/functional/bind.h"

@ -22,6 +22,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"

@ -6,6 +6,7 @@
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include <windows.h>
#include <wrl/client.h>
#include <tuple>

@ -30,9 +30,10 @@
#include "crypto/sha2.h"
#if BUILDFLAG(IS_WIN)
#include <aclapi.h>
#include <windows.h>
#include <aclapi.h>
#include "base/win/scoped_localalloc.h"
#include "base/win/sid.h"
#endif

@ -5,6 +5,7 @@
#include "chrome/browser/device_reauth/win/authenticator_win.h"
#include <objbase.h>
#include <windows.foundation.h>
#include <windows.security.credentials.ui.h>
#include <windows.storage.streams.h>

@ -5,10 +5,13 @@
#include "chrome/browser/download/download_status_updater.h"
#include <objbase.h>
#include <shobjidl.h>
#include <string>
#include <wrl/client.h>
#include <string>
#include "base/logging.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"

@ -4,13 +4,14 @@
#include "chrome/browser/enterprise/platform_auth/cloud_ap_provider_win.h"
#include <stdint.h>
#include <windows.h> // Must precede lmjoin.h.
#include <objbase.h>
#include <windows.h>
#include <lmcons.h>
#include <lmjoin.h>
#include <objbase.h>
#include <proofofpossessioncookieinfo.h>
#include <stdint.h>
#include <windows.security.authentication.web.core.h>
#include <wrl/client.h>

@ -40,8 +40,9 @@
#endif
#if BUILDFLAG(IS_WIN)
#include <netfw.h>
#include <windows.h>
#include <netfw.h>
#include <wrl/client.h>
#include "net/dns/public/win_dns_system_settings.h"

@ -4,12 +4,18 @@
#include "chrome/browser/enterprise/signals/device_info_fetcher_win.h"
#include <Windows.h>
#include <windows.h>
// SECURITY_WIN32 must be defined in order to get
// EXTENDED_NAME_FORMAT enumeration.
#define SECURITY_WIN32 1
#include <security.h>
#undef SECURITY_WIN32
#include <shobjidl.h> // NOLINT(build/include_order)
#include <DSRole.h> // NOLINT(build/include_order)
#include <iphlpapi.h> // NOLINT(build/include_order)
#include <powersetting.h> // NOLINT(build/include_order)
#include <propsys.h> // NOLINT(build/include_order)
#include <wincred.h>
#include "base/files/file_path.h"
@ -21,19 +27,11 @@
#include "base/system/sys_info.h"
#include "base/win/registry.h"
#include "base/win/win_util.h"
#include "base/win/windows_types.h"
#include "base/win/windows_version.h"
#include "base/win/wmi.h"
#include "chrome/browser/enterprise/signals/signals_common.h"
#include "net/base/network_interfaces.h"
// Those headers need defines from windows_types.h, thus have to come after it.
#include <DSRole.h> // NOLINT(build/include_order)
#include <iphlpapi.h> // NOLINT(build/include_order)
#include <powersetting.h> // NOLINT(build/include_order)
#include <propsys.h> // NOLINT(build/include_order)
#include <shobjidl.h> // NOLINT(build/include_order)
namespace enterprise_signals {
namespace {

@ -49,9 +49,10 @@
#endif
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include <netfw.h>
#include <shlobj.h>
#include <windows.h>
#include <wrl/client.h>
#include "base/test/test_reg_util_win.h"

@ -6,6 +6,7 @@
#include "chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h"
#include <windows.h>
#include <setupapi.h>
// LogSeverity is both a macro in setupapi.h and a typedef in base/logging.h

@ -4,9 +4,10 @@
// This is a simple Native Message Host application. It echoes any messages
// it receives.
#include <string.h>
#include <windows.h>
#include <string.h>
#include "base/files/file.h"
int main(int argc, char* argv[]) {

@ -5,9 +5,9 @@
#include "chrome/browser/extensions/api/messaging/native_process_launcher.h"
#include <windows.h>
#include <stdint.h>
#include <shellapi.h>
#include <stdint.h>
#include <string>

@ -4,11 +4,12 @@
#include "chrome/browser/extensions/system_display/display_info_provider_win.h"
#include <memory>
#include <utility>
#include <windows.h>
#include <stddef.h>
#include <windows.h>
#include <memory>
#include <utility>
#include "base/hash/hash.h"
#include "base/strings/string_number_conversions.h"

@ -5,6 +5,7 @@
#include "chrome/browser/first_run/first_run_internal.h"
#include <windows.h>
#include <shellapi.h>
#include <stdint.h>

@ -4,10 +4,10 @@
#include "chrome/browser/first_run/upgrade_util_win.h"
// Must be first.
#include <objbase.h>
#include <windows.h>
#include <objbase.h>
#include <psapi.h>
#include <shellapi.h>
#include <wrl/client.h>

@ -5,6 +5,7 @@
#include "chrome/browser/google/google_update_win.h"
#include <objbase.h>
#include <stdint.h>
#include <string.h>

@ -5,6 +5,7 @@
#include "chrome/browser/icon_loader.h"
#include <windows.h>
#include <shellapi.h>
#include "base/files/file_path.h"

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The order of these includes is important.
#include <objbase.h>
#include <unknwn.h>
#include <windows.h>
#include <intshcut.h>
#include <objbase.h>
#include <shlguid.h>
#include <shlobj.h>
#include <stddef.h>

@ -5,23 +5,21 @@
#include "chrome/browser/media/router/discovery/discovery_network_list_win.h"
#include <winsock2.h>
#include <wrl/client.h>
#include <windot11.h> // NOLINT
#include <wlanapi.h> // NOLINT
#include <wrl/client.h>
#include <algorithm>
#include <cstring>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/threading/scoped_thread_priority.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/scoped_thread_priority.h"
#include "base/win/hstring_reference.h"
#include "base/win/scoped_hstring.h"
#include "base/win/windows_version.h"

@ -5,12 +5,11 @@
#ifndef CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_LIST_WIN_H_
#define CHROME_BROWSER_MEDIA_ROUTER_DISCOVERY_DISCOVERY_NETWORK_LIST_WIN_H_
#include <roapi.h>
#include <windows.networking.connectivity.h>
#include <ws2tcpip.h>
// iphlpapi.h must be included after ws2tcpip.h to use MIB_IF_TABLE2.
#include <iphlpapi.h> // NOLINT
#include <roapi.h>
#include <windows.networking.connectivity.h>
#include <map>
#include <memory>

@ -46,6 +46,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/strings/string_util_win.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
#endif

@ -42,6 +42,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/strings/string_util_win.h"
#endif

@ -35,6 +35,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/test/test_reg_util_win.h"
#include "base/win/registry.h"
#endif // BUILDFLAG(IS_WIN)

@ -5,6 +5,7 @@
#include "chrome/browser/media_galleries/win/mtp_device_operations_util.h"
#include <objbase.h>
#include <portabledevice.h>
#include <stdint.h>

@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Windows headers must come first.
#include "chrome/browser/memory_details.h"
#include <windows.h>
#include <TlHelp32.h>
#include <psapi.h>
#include <stddef.h>
#include <TlHelp32.h>
#include "chrome/browser/memory_details.h"
#include <memory>

@ -4,10 +4,10 @@
#include "chrome/browser/net/net_error_diagnostics_dialog.h"
// Winsock.h must be included before ndfapi.h.
#include <winsock2.h> // NOLINT
#include <ndfapi.h> // NOLINT
#include <windows.h> // NOLINT
#include <winsock2.h> // NOLINT
#include <ndfapi.h> // NOLINT
#include <memory>
#include <string>

@ -5,6 +5,7 @@
#include "chrome/browser/notifications/notification_platform_bridge_win.h"
#include <objbase.h>
#include <wrl/event.h>
#include <map>

@ -4,13 +4,13 @@
#include "chrome/browser/policy/browser_dm_token_storage_win.h"
// Must be first.
#include <objbase.h>
#include <unknwn.h>
#include <windows.h>
#include <comutil.h>
#include <objbase.h>
#include <oleauto.h>
#include <unknwn.h>
#include <winerror.h>
#include <wrl/client.h>

@ -18,6 +18,7 @@
#if BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/test/test_reg_util_win.h"
#include "base/win/registry.h"
#endif

@ -7,6 +7,7 @@
#include <windows.h>
#include <DSRole.h>
#include <algorithm>
#include <utility>

@ -4,9 +4,10 @@
#include "chrome/browser/printing/pdf_to_emf_converter.h"
#include <stdint.h>
#include <windows.h>
#include <stdint.h>
#include <memory>
#include <optional>
#include <string>

@ -4,9 +4,10 @@
#include "chrome/browser/printing/pdf_to_emf_converter.h"
#include <stdint.h>
#include <windows.h>
#include <stdint.h>
#include <limits>
#include <optional>
#include <string_view>

Some files were not shown because too many files have changed in this diff Show More