Ensure StrCat means StrCat
undefine StrCat from StrCatW after including windows headers that redefine it Add preprocessor checks StrCat is not defined to something else. Add presubmit check headers that include shlwapi.h that redefines StrCat are wrapped Bug: chromium:856536, chromium:817738 Change-Id: Ief9303cbf6fa4f55f671861e49fb1fc747ed59aa Reviewed-on: https://chromium-review.googlesource.com/1117180 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Commit-Queue: Danil Chapovalov <danilchap@chromium.org> Cr-Commit-Position: refs/heads/master@{#582449}
This commit is contained in:

committed by
Commit Bot

parent
856d335241
commit
3518f36e76
PRESUBMIT.pyPRESUBMIT_test.py
base
chrome
components
content/browser
accessibility
browser_accessibility_com_win.hbrowser_accessibility_win.hcross_platform_accessibility_browsertest.cc
renderer_host
remoting/host
rlz/test
sandbox/win
sandbox_poc
src
tests
validation_tests
services/device/generic_sensor
tools/win
ui
accessibility
base
22
PRESUBMIT.py
22
PRESUBMIT.py
@ -813,6 +813,28 @@ def _CheckNoIOStreamInHeaders(input_api, output_api):
|
||||
files) ]
|
||||
return []
|
||||
|
||||
def _CheckNoStrCatRedefines(input_api, output_api):
|
||||
"""Checks no windows headers with StrCat redefined are included directly."""
|
||||
files = []
|
||||
pattern_deny = input_api.re.compile(
|
||||
r'^#include\s*[<"](shlwapi|atlbase|propvarutil|sphelper).h[">]',
|
||||
input_api.re.MULTILINE)
|
||||
pattern_allow = input_api.re.compile(
|
||||
r'^#include\s"base/win/windows_defines.inc"',
|
||||
input_api.re.MULTILINE)
|
||||
for f in input_api.AffectedSourceFiles(input_api.FilterSourceFile):
|
||||
contents = input_api.ReadFile(f)
|
||||
if pattern_deny.search(contents) and not pattern_allow.search(contents):
|
||||
files.append(f.LocalPath())
|
||||
|
||||
if len(files):
|
||||
return [output_api.PresubmitError(
|
||||
'Do not #include shlwapi.h, atlbase.h, propvarutil.h or sphelper.h '
|
||||
'directly since they pollute code with StrCat macro. Instead, '
|
||||
'include matching header from base/win. See http://crbug.com/856536',
|
||||
files) ]
|
||||
return []
|
||||
|
||||
|
||||
def _CheckNoUNIT_TESTInSourceFiles(input_api, output_api):
|
||||
"""Checks to make sure no source files use UNIT_TEST."""
|
||||
|
@ -1858,6 +1858,42 @@ class CheckUniquePtrTest(unittest.TestCase):
|
||||
results = PRESUBMIT._CheckUniquePtr(mock_input_api, MockOutputApi())
|
||||
self.assertEqual(0, len(results))
|
||||
|
||||
class CheckNoDirectIncludesHeadersWhichRedefineStrCat(unittest.TestCase):
|
||||
def testBlocksDirectIncludes(self):
|
||||
mock_input_api = MockInputApi()
|
||||
mock_input_api.files = [
|
||||
MockFile('dir/foo_win.cc', ['#include "shlwapi.h"']),
|
||||
MockFile('dir/bar.h', ['#include <propvarutil.h>']),
|
||||
MockFile('dir/baz.h', ['#include <atlbase.h>']),
|
||||
MockFile('dir/jumbo.h', ['#include "sphelper.h"']),
|
||||
]
|
||||
results = PRESUBMIT._CheckNoStrCatRedefines(mock_input_api, MockOutputApi())
|
||||
self.assertEquals(1, len(results))
|
||||
self.assertEquals(4, len(results[0].items))
|
||||
self.assertTrue('StrCat' in results[0].message)
|
||||
self.assertTrue('foo_win.cc' in results[0].items[0])
|
||||
self.assertTrue('bar.h' in results[0].items[1])
|
||||
self.assertTrue('baz.h' in results[0].items[2])
|
||||
self.assertTrue('jumbo.h' in results[0].items[3])
|
||||
|
||||
def testAllowsToIncludeWrapper(self):
|
||||
mock_input_api = MockInputApi()
|
||||
mock_input_api.files = [
|
||||
MockFile('dir/baz_win.cc', ['#include "base/win/shlwapi.h"']),
|
||||
MockFile('dir/baz-win.h', ['#include "base/win/atl.h"']),
|
||||
]
|
||||
results = PRESUBMIT._CheckNoStrCatRedefines(mock_input_api, MockOutputApi())
|
||||
self.assertEquals(0, len(results))
|
||||
|
||||
def testAllowsToCreateWrapper(self):
|
||||
mock_input_api = MockInputApi()
|
||||
mock_input_api.files = [
|
||||
MockFile('base/win/shlwapi.h', [
|
||||
'#include <shlwapi.h>',
|
||||
'#include "base/win/windows_defines.inc"']),
|
||||
]
|
||||
results = PRESUBMIT._CheckNoStrCatRedefines(mock_input_api, MockOutputApi())
|
||||
self.assertEquals(0, len(results))
|
||||
|
||||
class TranslationScreenshotsTest(unittest.TestCase):
|
||||
# An empty grd file.
|
||||
|
@ -1060,6 +1060,7 @@ jumbo_component("base") {
|
||||
"vlog.cc",
|
||||
"vlog.h",
|
||||
"win/async_operation.h",
|
||||
"win/atl.h",
|
||||
"win/com_init_check_hook.cc",
|
||||
"win/com_init_check_hook.h",
|
||||
"win/com_init_util.cc",
|
||||
@ -1088,6 +1089,7 @@ jumbo_component("base") {
|
||||
"win/patch_util.h",
|
||||
"win/process_startup_helper.cc",
|
||||
"win/process_startup_helper.h",
|
||||
"win/propvarutil.h",
|
||||
"win/reference.h",
|
||||
"win/registry.cc",
|
||||
"win/registry.h",
|
||||
@ -1116,8 +1118,10 @@ jumbo_component("base") {
|
||||
"win/scoped_windows_thread_environment.h",
|
||||
"win/scoped_winrt_initializer.cc",
|
||||
"win/scoped_winrt_initializer.h",
|
||||
"win/shlwapi.h",
|
||||
"win/shortcut.cc",
|
||||
"win/shortcut.h",
|
||||
"win/sphelper.h",
|
||||
"win/startup_information.cc",
|
||||
"win/startup_information.h",
|
||||
"win/typed_event_handler.h",
|
||||
@ -1127,6 +1131,9 @@ jumbo_component("base") {
|
||||
"win/wait_chain.h",
|
||||
"win/win_util.cc",
|
||||
"win/win_util.h",
|
||||
"win/windows_defines.inc",
|
||||
"win/windows_types.h",
|
||||
"win/windows_undefines.inc",
|
||||
"win/windows_version.cc",
|
||||
"win/windows_version.h",
|
||||
"win/winrt_storage_util.cc",
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
#include "base/files/file_enumerator.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
|
@ -14,8 +14,9 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// To resolve a conflict with Win32 API StrCat macro.
|
||||
#include "base/win/windows_types.h"
|
||||
// Guard against conflict with Win32 API StrCat macro:
|
||||
// check StrCat wasn't and will not be redefined.
|
||||
#define StrCat StrCat
|
||||
#endif
|
||||
|
||||
namespace base {
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "base/test/test_file_util.h"
|
||||
|
||||
#include <aclapi.h>
|
||||
#include <shlwapi.h>
|
||||
#include <stddef.h>
|
||||
#include <wchar.h>
|
||||
#include <windows.h>
|
||||
@ -20,6 +19,7 @@
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
|
28
base/win/atl.h
Normal file
28
base/win/atl.h
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
#ifndef BASE_WIN_ATL_H_
|
||||
#define BASE_WIN_ATL_H_
|
||||
|
||||
// Check no prior poisonous defines were made.
|
||||
#include "base/win/windows_defines.inc"
|
||||
// Undefine before windows header will make the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
|
||||
#ifndef _ATL_NO_EXCEPTIONS
|
||||
#define _ATL_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlctl.h>
|
||||
#include <atlhost.h>
|
||||
#include <atlsecurity.h>
|
||||
#include <atlwin.h>
|
||||
|
||||
// Undefine the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
// Check no poisonous defines follow this include
|
||||
#include "base/win/windows_defines.inc"
|
||||
|
||||
#endif // BASE_WIN_ATL_H_
|
19
base/win/propvarutil.h
Normal file
19
base/win/propvarutil.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
#ifndef BASE_WIN_PROPVARUTIL_H_
|
||||
#define BASE_WIN_PROPVARUTIL_H_
|
||||
|
||||
// Check no prior poisonous defines were made.
|
||||
#include "base/win/windows_defines.inc"
|
||||
// Undefine before windows header will make the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
|
||||
#include <propvarutil.h>
|
||||
|
||||
// Undefine the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
// Check no poisonous defines follow this include
|
||||
#include "base/win/windows_defines.inc"
|
||||
|
||||
#endif // BASE_WIN_PROPVARUTIL_H_
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "base/win/registry.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stddef.h>
|
||||
#include <algorithm>
|
||||
|
||||
@ -12,6 +11,7 @@
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
||||
namespace base {
|
||||
|
19
base/win/shlwapi.h
Normal file
19
base/win/shlwapi.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
#ifndef BASE_WIN_SHLWAPI_H_
|
||||
#define BASE_WIN_SHLWAPI_H_
|
||||
|
||||
// Check no prior poisonous defines were made.
|
||||
#include "base/win/windows_defines.inc"
|
||||
// Undefine before windows header will make the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
// Undefine the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
// Check no poisonous defines follow this include
|
||||
#include "base/win/windows_defines.inc"
|
||||
|
||||
#endif // BASE_WIN_SHLWAPI_H_
|
19
base/win/sphelper.h
Normal file
19
base/win/sphelper.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
#ifndef BASE_WIN_SPHELPER_H_
|
||||
#define BASE_WIN_SPHELPER_H_
|
||||
|
||||
// Check no prior poisonous defines were made.
|
||||
#include "base/win/windows_defines.inc"
|
||||
// Undefine before windows header will make the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
|
||||
#include <sphelper.h>
|
||||
|
||||
// Undefine the poisonous defines
|
||||
#include "base/win/windows_undefines.inc"
|
||||
// Check no poisonous defines follow this include
|
||||
#include "base/win/windows_defines.inc"
|
||||
|
||||
#endif // BASE_WIN_SPHELPER_H_
|
@ -14,13 +14,11 @@
|
||||
#include <mdmregistration.h>
|
||||
#include <objbase.h>
|
||||
#include <propkey.h>
|
||||
#include <propvarutil.h>
|
||||
#include <psapi.h>
|
||||
#include <roapi.h>
|
||||
#include <sddl.h>
|
||||
#include <setupapi.h>
|
||||
#include <shellscalingapi.h>
|
||||
#include <shlwapi.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
@ -45,11 +43,13 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/win/core_winrt_util.h"
|
||||
#include "base/win/propvarutil.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_co_mem.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
#include "base/win/scoped_hstring.h"
|
||||
#include "base/win/scoped_propvariant.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/win_client_metrics.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
||||
|
12
base/win/windows_defines.inc
Normal file
12
base/win/windows_defines.inc
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This file verifies no poisonous defines from windows headers are present.
|
||||
// If you add more macros here, add them to windows_undefines.inc too
|
||||
|
||||
// This will generate an error if it was defined to something different, or
|
||||
// if it is defined to something different after.
|
||||
// Preprocessor will also nicely point to header that defined it differently.
|
||||
#define StrCat StrCat
|
||||
|
@ -248,6 +248,5 @@ WINBASEAPI VOID WINAPI SetLastError(_In_ DWORD dwErrCode);
|
||||
#define SendMessageCallback SendMessageCallbackW
|
||||
#define SetCurrentDirectory SetCurrentDirectoryW
|
||||
#define StartService StartServiceW
|
||||
#define StrCat StrCatW
|
||||
|
||||
#endif // BASE_WIN_WINDOWS_TYPES_H
|
||||
|
9
base/win/windows_undefines.inc
Normal file
9
base/win/windows_undefines.inc
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This file undefines poisonous defines from windows headers.
|
||||
// If you add more macros here, add them to windows_defines.inc too
|
||||
|
||||
#undef StrCat
|
||||
|
@ -65,12 +65,12 @@
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <atlbase.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/debug/close_handle_hook_win.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "chrome/browser/downgrade/user_data_downgrade.h"
|
||||
#include "chrome/child/v8_breakpad_support_win.h"
|
||||
#include "chrome/common/child_process_logging.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "chrome/app/main_dll_loader_win.h"
|
||||
|
||||
#include <windows.h> // NOLINT
|
||||
#include <shlwapi.h> // NOLINT
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <userenv.h> // NOLINT
|
||||
@ -28,6 +27,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "chrome/app/chrome_watcher_client_win.h"
|
||||
#include "chrome/app/chrome_watcher_command_line_win.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "chrome/browser/conflicts/uninstall_application_win.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include <memory>
|
||||
@ -22,6 +21,7 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/sequenced_task_runner_handle.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_variant.h"
|
||||
#include "chrome/browser/win/automation_controller.h"
|
||||
#include "chrome/browser/win/ui_automation_util.h"
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
#include "chrome/browser/google/google_update_win.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <objbase.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@ -33,6 +31,7 @@
|
||||
#include "base/threading/sequenced_task_runner_handle.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/version.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_bstr.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
|
@ -5,8 +5,7 @@
|
||||
#include "chrome/browser/google/google_update_win.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include <memory>
|
||||
@ -24,6 +23,7 @@
|
||||
#include "base/test/test_simple_task_runner.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/version.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "chrome/common/chrome_version.h"
|
||||
#include "chrome/install_static/test/scoped_install_details.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <unknwn.h>
|
||||
#include <intshcut.h>
|
||||
#include <objbase.h>
|
||||
#include <propvarutil.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlobj.h>
|
||||
#include <stddef.h>
|
||||
@ -28,6 +27,7 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/win/propvarutil.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_propvariant.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <objbase.h>
|
||||
#include <shlwapi.h>
|
||||
#include <shobjidl.h>
|
||||
#include <propkey.h> // Needs to come after shobjidl.h.
|
||||
#include <stddef.h>
|
||||
@ -36,6 +35,7 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_propvariant.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/shortcut.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "chrome/browser/policy/policy_path_parser.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include <math.h>
|
||||
#include <objbase.h>
|
||||
#include <sapi.h>
|
||||
#include <sphelper.h>
|
||||
#include <stdint.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
@ -16,6 +15,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "base/win/scoped_co_mem.h"
|
||||
#include "base/win/sphelper.h"
|
||||
#include "chrome/browser/speech/tts_controller.h"
|
||||
#include "chrome/browser/speech/tts_platform.h"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "chrome/browser/ui/pdf/adobe_reader_info_win.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <algorithm>
|
||||
@ -18,6 +17,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/version.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
|
||||
namespace {
|
||||
|
@ -2,14 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// For WinDDK ATL compatibility, these ATL headers must come first.
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <atlbase.h> // NOLINT
|
||||
#include <atlwin.h> // NOLINT
|
||||
#endif
|
||||
|
||||
#include "chrome/browser/ui/views/omnibox/omnibox_result_view.h"
|
||||
|
||||
#include <limits.h>
|
||||
@ -21,6 +13,7 @@
|
||||
#include "base/macros.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/ui/layout_constants.h"
|
||||
#include "chrome/browser/ui/omnibox/omnibox_theme.h"
|
||||
#include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
|
||||
@ -43,6 +36,10 @@
|
||||
#include "ui/events/event.h"
|
||||
#include "ui/gfx/paint_vector_icon.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/win/atl.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
// Creates a views::Background for the current result style.
|
||||
|
@ -4,10 +4,6 @@
|
||||
|
||||
#include "chrome/browser/win/automation_controller.h"
|
||||
|
||||
// Needed for atlcom.h
|
||||
#include <atlbase.h>
|
||||
|
||||
#include <atlcom.h>
|
||||
#include <stdint.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
@ -20,6 +16,7 @@
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_variant.h"
|
||||
#include "chrome/browser/win/ui_automation_util.h"
|
||||
#include "ui/base/win/atl_module.h"
|
||||
|
@ -4,13 +4,12 @@
|
||||
|
||||
#include "chrome/chrome_cleaner/http/error_utils.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
|
||||
namespace common {
|
||||
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
#include "chrome/installer/util/copy_tree_work_item.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "chrome/installer/util/logging_installer.h"
|
||||
|
||||
CopyTreeWorkItem::~CopyTreeWorkItem() {
|
||||
|
@ -2,12 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "chrome/installer/util/create_reg_key_work_item.h"
|
||||
#include "chrome/installer/util/install_util.h"
|
||||
#include "chrome/installer/util/logging_installer.h"
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
#include "chrome/installer/util/delete_reg_key_work_item.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "chrome/installer/util/install_util.h"
|
||||
|
||||
using base::win::RegKey;
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "chrome/installer/util/google_update_settings.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <shlwapi.h> // For SHDeleteKey.
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
@ -17,6 +16,7 @@
|
||||
#include "base/test/scoped_path_override.h"
|
||||
#include "base/test/test_reg_util_win.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h" // For SHDeleteKey.
|
||||
#include "base/win/win_util.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/install_static/install_util.h"
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
@ -27,6 +26,7 @@
|
||||
#include "base/values.h"
|
||||
#include "base/version.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/shortcut.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "chrome/installer/util/l10n_string_util.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
@ -16,6 +15,7 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "chrome/install_static/install_details.h"
|
||||
#include "chrome/install_static/install_modes.h"
|
||||
#include "chrome/installer/util/installer_util_strings.h"
|
||||
|
@ -4,10 +4,9 @@
|
||||
|
||||
#include "chrome/installer/util/move_tree_work_item.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "chrome/installer/util/duplicate_tree_detector.h"
|
||||
#include "chrome/installer/util/logging_installer.h"
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
// <security.h> needs this.
|
||||
#define SECURITY_WIN32 1
|
||||
#include <security.h> // For GetUserNameEx()
|
||||
#include <shlwapi.h> // For PathIsUNC()
|
||||
#include <stddef.h>
|
||||
|
||||
#include <memory>
|
||||
@ -36,6 +35,7 @@
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/values.h"
|
||||
#include "base/win/shlwapi.h" // For PathIsUNC()
|
||||
#include "base/win/win_util.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "components/json_schema/json_schema_constants.h"
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
#include "components/update_client/background_downloader_win.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <objbase.h>
|
||||
#include <winerror.h>
|
||||
|
||||
@ -28,6 +26,7 @@
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/task/post_task.h"
|
||||
#include "base/task/task_traits.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_co_mem.h"
|
||||
#include "components/update_client/task_traits.h"
|
||||
#include "components/update_client/update_client_errors.h"
|
||||
|
@ -5,8 +5,6 @@
|
||||
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_
|
||||
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <oleacc.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
@ -15,6 +13,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/gtest_prod_util.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "content/browser/accessibility/browser_accessibility.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_win.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
@ -5,9 +5,7 @@
|
||||
#ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_
|
||||
#define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
#include "content/browser/accessibility/browser_accessibility.h"
|
||||
#include "content/browser/accessibility/browser_accessibility_com_win.h"
|
||||
#include "content/common/content_export.h"
|
||||
|
@ -23,8 +23,7 @@
|
||||
#include "ui/accessibility/ax_tree.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_com_initializer.h"
|
||||
#include "ui/base/win/atl_module.h"
|
||||
#endif
|
||||
|
@ -5,15 +5,14 @@
|
||||
#ifndef CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_
|
||||
#define CONTENT_BROWSER_RENDERER_HOST_LEGACY_RENDER_WIDGET_HOST_WIN_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcrack.h>
|
||||
#include <atlwin.h>
|
||||
#include <oleacc.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "ui/compositor/compositor_animation_observer.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
|
@ -4,12 +4,11 @@
|
||||
|
||||
#include "remoting/host/pairing_registry_delegate_win.h"
|
||||
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "base/guid.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
namespace remoting {
|
||||
|
@ -5,12 +5,9 @@
|
||||
#ifndef REMOTING_HOST_WIN_CHROMOTING_MODULE_H_
|
||||
#define REMOTING_HOST_WIN_CHROMOTING_MODULE_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlctl.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_com_initializer.h"
|
||||
|
||||
// chromoting_lib.h contains MIDL-generated declarations.
|
||||
|
@ -2,10 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// ATL headers have to go first.
|
||||
#include <atlbase.h>
|
||||
#include <atlhost.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@ -16,6 +12,7 @@
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_com_initializer.h"
|
||||
#include "remoting/base/auto_thread_task_runner.h"
|
||||
#include "remoting/host/screen_resolution.h"
|
||||
|
@ -5,14 +5,12 @@
|
||||
#ifndef REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_
|
||||
#define REMOTING_HOST_WIN_RDP_HOST_WINDOW_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlcrack.h>
|
||||
#include <atlctl.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "net/base/ip_endpoint.h"
|
||||
#include "remoting/host/screen_resolution.h"
|
||||
// The following header was generated by Visual Studio. We had to check it in
|
||||
|
@ -5,13 +5,11 @@
|
||||
#ifndef REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_
|
||||
#define REMOTING_HOST_WIN_RDP_DESKTOP_SESSION_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlctl.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
// chromoting_lib.h contains MIDL-generated declarations.
|
||||
#include "remoting/host/win/chromoting_lib.h"
|
||||
#include "remoting/host/win/rdp_client.h"
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include <shlwapi.h>
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#elif defined(OS_POSIX)
|
||||
#include "base/files/file_path.h"
|
||||
#include "rlz/lib/rlz_value_store.h"
|
||||
|
@ -11,12 +11,12 @@
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <windowsx.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlsecurity.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "sandbox/win/sandbox_poc/resource.h"
|
||||
#include "sandbox/win/src/acl.h"
|
||||
#include "sandbox/win/src/sandbox.h"
|
||||
|
@ -6,12 +6,9 @@
|
||||
|
||||
#include "sandbox/win/src/restricted_token.h"
|
||||
|
||||
#define _ATL_NO_EXCEPTIONS
|
||||
#include <atlbase.h>
|
||||
#include <atlsecurity.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "sandbox/win/src/security_capabilities.h"
|
||||
|
@ -6,11 +6,9 @@
|
||||
|
||||
#include "sandbox/win/src/sid.h"
|
||||
|
||||
#define _ATL_NO_EXCEPTIONS
|
||||
#include <atlbase.h>
|
||||
#include <atlsecurity.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
// It includes the tests that need to be performed inside the
|
||||
// sandbox.
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "sandbox/win/tests/common/controller.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
#include <SensorsApi.h>
|
||||
#include <objbase.h>
|
||||
#include <propvarutil.h>
|
||||
#include <sensors.h>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/win/iunknown_impl.h"
|
||||
#include "base/win/propvarutil.h"
|
||||
#include "base/win/scoped_propvariant.h"
|
||||
#include "services/device/generic_sensor/fake_platform_sensor_and_provider.h"
|
||||
#include "services/device/generic_sensor/generic_sensor_consts.h"
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <shlwapi.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
@ -13,6 +12,8 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "base/win/shlwapi.h"
|
||||
|
||||
#pragma warning(disable : 4996)
|
||||
|
||||
// Create |count| number of temp files at |folder_path| using GUID based method.
|
||||
|
@ -20,13 +20,14 @@
|
||||
// Global variables are not necessarily a problem but it is useful to understand
|
||||
// them, and monitoring their changes can be instructive.
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <dia2.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
|
||||
// Helper function for comparing strings - returns a strcmp/wcscmp compatible
|
||||
// value.
|
||||
int StringCompare(const std::wstring& lhs, const std::wstring& rhs) {
|
||||
|
@ -5,8 +5,6 @@
|
||||
#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_
|
||||
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <objbase.h>
|
||||
#include <oleacc.h>
|
||||
#include <oleauto.h>
|
||||
@ -20,6 +18,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "third_party/iaccessible2/ia2_api_all.h"
|
||||
#include "ui/accessibility/ax_export.h"
|
||||
#include "ui/accessibility/ax_text_utils.h"
|
||||
|
@ -4,13 +4,12 @@
|
||||
|
||||
#include "ui/accessibility/platform/ax_platform_node.h"
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <oleacc.h>
|
||||
#include <wrl/client.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/win/atl.h"
|
||||
#include "base/win/scoped_bstr.h"
|
||||
#include "base/win/scoped_variant.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -5,8 +5,6 @@
|
||||
#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_RELATION_WIN_H_
|
||||
#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_RELATION_WIN_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <oleacc.h>
|
||||
#include <wrl/client.h>
|
||||
#include <vector>
|
||||
@ -14,6 +12,7 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "third_party/iaccessible2/ia2_api_all.h"
|
||||
#include "ui/accessibility/ax_export.h"
|
||||
#include "ui/accessibility/ax_text_utils.h"
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "ui/base/clipboard/clipboard_util_win.h"
|
||||
|
||||
#include <shellapi.h>
|
||||
#include <shlwapi.h>
|
||||
#include <wininet.h> // For INTERNET_MAX_URL_LENGTH.
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
@ -16,6 +15,7 @@
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/scoped_hglobal.h"
|
||||
#include "base/win/shlwapi.h"
|
||||
#include "net/base/filename_util.h"
|
||||
#include "ui/base/clipboard/clipboard.h"
|
||||
#include "ui/base/clipboard/custom_data_helper.h"
|
||||
|
@ -5,14 +5,13 @@
|
||||
#ifndef UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_
|
||||
#define UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <msctf.h>
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/win/atl.h"
|
||||
#include "ui/base/ime/text_input_type.h"
|
||||
#include "ui/base/ime/ui_base_ime_export.h"
|
||||
#include "ui/gfx/range/range.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
#ifndef UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
|
||||
#define UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include "base/win/atl.h" // Must be before UIAutomationCore.h
|
||||
|
||||
#include <UIAutomationCore.h>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
|
@ -5,11 +5,9 @@
|
||||
#ifndef UI_BASE_WIN_ATL_MODULE_H_
|
||||
#define UI_BASE_WIN_ATL_MODULE_H_
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/win/atl.h"
|
||||
|
||||
namespace ui {
|
||||
namespace win {
|
||||
|
Reference in New Issue
Block a user