Skip to content

Commit

Permalink
logging.h related include-what-you-use (ui/)
Browse files Browse the repository at this point in the history
Fix code that was implicitly depending on logging.h or its
dependencies.

For example, code that uses DISALLOW_COPY_AND_ASSIGN should
include base/macros.h, but it currently happens to work if
it pulls in logging.h directly or through some dependency.

This is part of refactoring the codebase to use
check.h/check_op.h for the CHECK and CHECK_op macro
instead of logging.h.

Bug: 1031540
Change-Id: I6e6a7857d8a39a231d89fa5819cd3af572a6d9b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157086
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#761479}
  • Loading branch information
zmodem authored and Commit Bot committed Apr 22, 2020
1 parent 4669213 commit 17cd607
Show file tree
Hide file tree
Showing 79 changed files with 87 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/accessibility/platform/ax_unique_id.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <unordered_set>

#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/stl_util.h"

namespace ui {
Expand Down
2 changes: 2 additions & 0 deletions ui/android/edge_effect_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ui/android/edge_effect_base.h"

#include "base/logging.h"

namespace ui {

// static
Expand Down
1 change: 1 addition & 0 deletions ui/base/accelerators/test_accelerator_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_BASE_ACCELERATORS_TEST_ACCELERATOR_TARGET_H_
#define UI_BASE_ACCELERATORS_TEST_ACCELERATOR_TARGET_H_

#include "base/macros.h"
#include "ui/base/accelerators/accelerator.h"

namespace ui {
Expand Down
1 change: 1 addition & 0 deletions ui/base/clipboard/clipboard_util_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <utility>
#include <vector>

#include "base/callback_forward.h"
#include "base/component_export.h"
#include "base/files/file_path.h"
#include "base/strings/string16.h"
Expand Down
1 change: 1 addition & 0 deletions ui/base/dragdrop/os_exchange_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <objidl.h>
#endif

#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "ui/base/dragdrop/download_file_interface.h"
Expand Down
1 change: 1 addition & 0 deletions ui/base/dragdrop/os_exchange_data_provider_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/base/dragdrop/os_exchange_data_provider_factory.h"

#include "base/logging.h"
#include "build/build_config.h"

#if defined(USE_X11)
Expand Down
1 change: 1 addition & 0 deletions ui/base/idle/scoped_set_idle_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_BASE_IDLE_SCOPED_SET_IDLE_STATE_H_
#define UI_BASE_IDLE_SCOPED_SET_IDLE_STATE_H_

#include "base/macros.h"
#include "base/optional.h"
#include "ui/base/idle/idle.h"

Expand Down
1 change: 1 addition & 0 deletions ui/base/ime/character_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <iterator>
#include <string>

#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
1 change: 1 addition & 0 deletions ui/base/ime/init/input_method_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "base/compiler_specific.h"
#include "base/component_export.h"
#include "base/macros.h"
#include "ui/base/ime/init/input_method_initializer.h"
#include "ui/gfx/native_widget_types.h"

Expand Down
2 changes: 2 additions & 0 deletions ui/base/ime/init/input_method_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ui/base/ime/init/input_method_initializer.h"

#include <ostream>

#include "build/build_config.h"

#if defined(OS_CHROMEOS)
Expand Down
1 change: 1 addition & 0 deletions ui/base/ime/mock_ime_input_context_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/base/ime/mock_ime_input_context_handler.h"

#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/ime/composition_text.h"
#include "ui/base/ime/input_method.h"
Expand Down
1 change: 1 addition & 0 deletions ui/base/l10n/l10n_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "base/i18n/rtl.h"
#include "base/i18n/string_compare.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
Expand Down
1 change: 1 addition & 0 deletions ui/base/test/skia_gold_pixel_diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>

#include "base/files/file_path.h"
#include "base/macros.h"

namespace base {
class CommandLine;
Expand Down
1 change: 1 addition & 0 deletions ui/color/color_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_COLOR_COLOR_ID_H_
#define UI_COLOR_COLOR_ID_H_

#include "base/logging.h"
#include "build/build_config.h"
#include "build/buildflag.h"

Expand Down
1 change: 1 addition & 0 deletions ui/display/display_transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/display/display_transform.h"

#include "base/logging.h"
#include "ui/gfx/overlay_transform_utils.h"

namespace display {
Expand Down
1 change: 1 addition & 0 deletions ui/display/fake/fake_display_snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
Expand Down
2 changes: 2 additions & 0 deletions ui/display/manager/display_manager_utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <algorithm>
#include <set>
#include <sstream>
#include <vector>

#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
Expand Down
1 change: 1 addition & 0 deletions ui/display/screen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <utility>

#include "base/logging.h"
#include "ui/display/display.h"
#include "ui/display/types/display_constants.h"
#include "ui/gfx/geometry/rect.h"
Expand Down
1 change: 1 addition & 0 deletions ui/display/types/display_snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <sstream>
#include <utility>

#include "base/logging.h"
#include "base/strings/stringprintf.h"

namespace display {
Expand Down
1 change: 1 addition & 0 deletions ui/display/util/edid_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <bitset>

#include "base/hash/hash.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
Expand Down
1 change: 1 addition & 0 deletions ui/display/win/scaling_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>

#include "base/logging.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/safe_integer_conversions.h"
#include "ui/gfx/geometry/size.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/blink/prediction/empty_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_EVENTS_BLINK_PREDICTION_EMPTY_FILTER_H_
#define UI_EVENTS_BLINK_PREDICTION_EMPTY_FILTER_H_

#include "base/macros.h"
#include "ui/events/blink/prediction/input_filter.h"

namespace ui {
Expand Down
2 changes: 2 additions & 0 deletions ui/events/blink/prediction/kalman_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ui/events/blink/prediction/kalman_filter.h"

#include "base/check_op.h"

namespace {
constexpr uint32_t kStableIterNum = 4;

Expand Down
1 change: 1 addition & 0 deletions ui/events/blink/prediction/kalman_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_EVENTS_BLINK_PREDICTION_KALMAN_FILTER_H_
#define UI_EVENTS_BLINK_PREDICTION_KALMAN_FILTER_H_

#include "base/macros.h"
#include "ui/gfx/geometry/matrix3_f.h"

namespace ui {
Expand Down
1 change: 1 addition & 0 deletions ui/events/blink/prediction/one_euro_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef UI_EVENTS_BLINK_PREDICTION_ONE_EURO_FILTER_H_
#define UI_EVENTS_BLINK_PREDICTION_ONE_EURO_FILTER_H_

#include "base/macros.h"
#include "third_party/one_euro_filter/src/one_euro_filter.h"
#include "ui/events/blink/prediction/input_filter.h"

Expand Down
1 change: 1 addition & 0 deletions ui/events/event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <cstring>
#include <utility>

#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_macros.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/event_dispatcher_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/events/event_dispatcher.h"

#include "base/logging.h"
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/event_rewriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <utility>

#include "base/logging.h"
#include "ui/events/event_rewriter_continuation.h"
#include "ui/events/event_source.h"

Expand Down
1 change: 1 addition & 0 deletions ui/events/event_rewriter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <set>
#include <utility>

#include "base/logging.h"
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/keycodes/dom/dom_code.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/event_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/events/event_source.h"

#include "base/logging.h"
#include "ui/events/event_rewriter_continuation.h"
#include "ui/events/event_sink.h"

Expand Down
1 change: 1 addition & 0 deletions ui/events/event_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <vector>

#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "ui/display/display.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/gesture_detection/gesture_touch_uma_histogram.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/events/gesture_detection/gesture_touch_uma_histogram.h"

#include "base/logging.h"
#include "base/metrics/histogram_macros.h"

namespace ui {
Expand Down
1 change: 1 addition & 0 deletions ui/events/gesture_event_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

#include "ui/events/gesture_event_details.h"
#include "base/logging.h"

namespace ui {

Expand Down
1 change: 1 addition & 0 deletions ui/events/keycodes/dom/dom_keyboard_layout_map_ozone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string>

#include "base/containers/flat_map.h"
#include "base/logging.h"
#include "base/macros.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/events/keycodes/dom/dom_key.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/keycodes/dom/dom_keyboard_layout_map_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <vector>

#include "base/containers/flat_map.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/stl_util.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/mobile_scroller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <cmath>

#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/numerics/math_constants.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <bitset>
#include <vector>

#include "base/macros.h"
#include "base/time/time.h"
#include "ui/events/ozone/evdev/touch_evdev_types.h"
#include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <linux/input.h>

#include "base/macros.h"
#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "ui/events/ozone/evdev/event_device_info.h"
#include "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_model.h"
#include "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <bitset>
#include <vector>

#include "base/macros.h"
#include "base/time/time.h"
#include "ui/events/ozone/evdev/touch_evdev_types.h"
#include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/events/ozone/evdev/touch_filter/open_palm_detection_filter.h"

#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/ozone/evdev/touch_filter/palm_detection_filter.h"
#include "ui/events/ozone/evdev/touch_filter/shared_palm_detection_filter_state.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "ui/events/ozone/evdev/touch_filter/palm_model/onedevice_train_palm_detection_filter_inference.h"
#define USE_EIGEN 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <cstdint>
#include <vector>

#include "base/macros.h"
#include "ui/events/ozone/evdev/touch_filter/neural_stylus_palm_detection_filter_model.h"

namespace ui {
Expand Down
1 change: 1 addition & 0 deletions ui/events/ozone/layout/scoped_keyboard_layout_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ui/events/ozone/layout/scoped_keyboard_layout_engine.h"

#include "base/check_op.h"
#include "ui/events/ozone/layout/keyboard_layout_engine.h"
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
#include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/win/events_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/logging.h"
#include "ui/events/event_utils.h"
#include "ui/events/win/events_win_utils.h"

Expand Down
1 change: 1 addition & 0 deletions ui/events/x/x11_event_translation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <vector>

#include "base/logging.h"
#include "base/time/time.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/events/event.h"
Expand Down
1 change: 1 addition & 0 deletions ui/gfx/color_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <stdint.h>

#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
Expand Down
1 change: 1 addition & 0 deletions ui/gfx/color_space.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "base/atomic_sequence_num.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkData.h"
Expand Down
1 change: 1 addition & 0 deletions ui/gfx/icc_profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/containers/mru_cache.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/third_party/skcms/skcms.h"
Expand Down
Loading

0 comments on commit 17cd607

Please sign in to comment.