Skip to content

Commit

Permalink
Remove/replace unnecessary logging.h includes in .cc files (services)
Browse files Browse the repository at this point in the history
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.

This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.

(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)

Bug: 1031540
Change-Id: Ib76c48802119bb3d17cd0268adf1ef64b1895593
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164615
Auto-Submit: Hans Wennborg <hans@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: Jorge Lucangeli Obes <jorgelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762961}
  • Loading branch information
zmodem authored and Commit Bot committed Apr 27, 2020
1 parent 799414f commit 1be837b
Show file tree
Hide file tree
Showing 128 changed files with 134 additions and 128 deletions.
3 changes: 2 additions & 1 deletion services/audio/output_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback_helpers.h"
#include "base/check.h"
#include "base/environment.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "base/optional.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
Expand Down
3 changes: 2 additions & 1 deletion services/audio/public/cpp/audio_system_to_service_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#include <utility>

#include "base/bind.h"
#include "base/logging.h"
#include "base/check_op.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/trace_event/trace_event.h"
#include "media/audio/audio_device_description.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
Expand Down
1 change: 0 additions & 1 deletion services/audio/public/cpp/sounds/test_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "services/audio/public/cpp/sounds/test_data.h"

#include "base/logging.h"
#include "base/threading/thread_task_runner_handle.h"

namespace audio {
Expand Down
2 changes: 1 addition & 1 deletion services/audio/service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <utility>

#include "base/bind.h"
#include "base/check_op.h"
#include "base/deferred_sequenced_task_runner.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/no_destructor.h"
#include "base/single_thread_task_runner.h"
Expand Down
2 changes: 1 addition & 1 deletion services/audio/test/fake_consumer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <memory>
#include <utility>

#include "base/check_op.h"
#include "base/files/file.h"
#include "base/logging.h"
#include "base/numerics/math_constants.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/task_environment.h"
Expand Down
1 change: 0 additions & 1 deletion services/data_decoder/image_decoder_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <utility>

#include "base/logging.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "skia/ext/image_operations.h"
#include "third_party/blink/public/platform/web_data.h"
Expand Down
2 changes: 1 addition & 1 deletion services/device/battery/battery_status_manager_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <memory>

#include "base/logging.h"
#include "base/macros.h"
#include "base/notreached.h"

namespace device {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check.h"
#include "base/numerics/math_constants.h"
#include "services/device/generic_sensor/orientation_util.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "services/device/generic_sensor/linear_acceleration_fusion_algorithm_using_accelerometer.h"

#include "base/logging.h"
#include "base/check.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"

namespace device {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check.h"
#include "services/device/generic_sensor/orientation_util.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check.h"
#include "services/device/generic_sensor/generic_sensor_consts.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
#include "ui/gfx/geometry/angle_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion services/device/generic_sensor/orientation_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/numerics/math_constants.h"
#include "services/device/generic_sensor/generic_sensor_consts.h"
#include "ui/gfx/geometry/angle_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion services/device/generic_sensor/platform_sensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <utility>

#include "base/bind.h"
#include "base/logging.h"
#include "base/check.h"
#include "base/threading/thread_task_runner_handle.h"
#include "services/device/generic_sensor/platform_sensor_provider.h"
#include "services/device/generic_sensor/platform_sensor_util.h"
Expand Down
3 changes: 2 additions & 1 deletion services/device/generic_sensor/platform_sensor_fusion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#include <algorithm>

#include "base/bind.h"
#include "base/logging.h"
#include "base/check.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "services/device/generic_sensor/platform_sensor_fusion_algorithm.h"
#include "services/device/generic_sensor/platform_sensor_provider.h"
#include "services/device/generic_sensor/platform_sensor_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/numerics/math_constants.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
#include "ui/gfx/geometry/angle_conversions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check.h"
#include "base/numerics/math_constants.h"
#include "services/device/generic_sensor/generic_sensor_consts.h"
#include "services/device/generic_sensor/platform_sensor_fusion.h"
Expand Down
1 change: 0 additions & 1 deletion services/device/geolocation/fake_location_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h"

Expand Down
3 changes: 2 additions & 1 deletion services/device/geolocation/geolocation_provider_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/check.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/notreached.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/default_tick_clock.h"
Expand Down
2 changes: 1 addition & 1 deletion services/device/geolocation/position_cache_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <cmath>

#include "base/check_op.h"
#include "base/guid.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"

namespace device {
Expand Down
2 changes: 1 addition & 1 deletion services/device/geolocation/wifi_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <algorithm>
#include <limits>

#include "base/logging.h"
#include "base/check.h"

namespace device {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "services/device/public/cpp/generic_sensor/platform_sensor_configuration.h"

#include "base/logging.h"
#include "base/check_op.h"

namespace device {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <stdlib.h>

#include "base/logging.h"
#include "base/check.h"

namespace device {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <memory>
#include <utility>

#include "base/logging.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
Expand Down
3 changes: 2 additions & 1 deletion services/device/public/cpp/test/test_wake_lock_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <utility>

#include "base/callback.h"
#include "base/logging.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote_set.h"

Expand Down
2 changes: 1 addition & 1 deletion services/device/serial/serial_device_enumerator_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/threading/scoped_blocking_call.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <memory>

#include "base/logging.h"
#include "base/macros.h"
#include "chromeos/settings/timezone_settings.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
Expand Down
2 changes: 1 addition & 1 deletion services/device/usb/fake_usb_device_handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <utility>

#include "base/callback.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/notreached.h"
#include "services/device/usb/usb_device.h"

namespace device {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "base/android/jni_android.h"
#include "base/bind.h"
#include "base/check.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/sequenced_task_runner.h"
#include "services/device/wake_lock/power_save_blocker/jni_headers/PowerSaveBlocker_jni.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
#include <string>

#include "base/bind.h"
#include "base/check.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "base/sequenced_task_runner.h"
#include "chromeos/dbus/power/power_policy_controller.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <windows.h>

#include "base/bind.h"
#include "base/logging.h"
#include "base/check.h"
#include "base/macros.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion services/metrics/public/cpp/metrics_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cmath>

#include "base/logging.h"
#include "base/check.h"
#include "base/numerics/safe_conversions.h"

namespace ukm {
Expand Down
2 changes: 1 addition & 1 deletion services/metrics/public/cpp/mojo_ukm_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <utility>

#include "base/logging.h"
#include "base/notreached.h"

namespace ukm {

Expand Down
2 changes: 1 addition & 1 deletion services/metrics/public/cpp/ukm_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <utility>

#include "base/atomicops.h"
#include "base/check_op.h"
#include "base/hash/hash.h"
#include "base/logging.h"
#include "third_party/metrics_proto/ukm/source.pb.h"

namespace ukm {
Expand Down
2 changes: 1 addition & 1 deletion services/metrics/public/cpp/ukm_source_id.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "services/metrics/public/cpp/ukm_source_id.h"

#include "base/atomic_sequence_num.h"
#include "base/logging.h"
#include "base/check.h"
#include "base/rand_util.h"

namespace ukm {
Expand Down
2 changes: 1 addition & 1 deletion services/network/chunked_data_pipe_upload_data_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "base/bind.h"
#include "base/callback.h"
#include "base/check_op.h"
#include "base/location.h"
#include "base/logging.h"
#include "mojo/public/c/system/types.h"
#include "net/base/io_buffer.h"

Expand Down
3 changes: 2 additions & 1 deletion services/network/cors/cors_url_loader_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "base/check.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/optional.h"
#include "base/run_loop.h"
#include "base/strings/string_piece.h"
Expand Down
3 changes: 2 additions & 1 deletion services/network/cross_origin_read_blocking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
#include <unordered_set>
#include <vector>

#include "base/check_op.h"
#include "base/command_line.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
Expand Down
2 changes: 1 addition & 1 deletion services/network/data_pipe_element_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "base/bind.h"
#include "base/callback.h"
#include "base/check_op.h"
#include "base/location.h"
#include "base/logging.h"
#include "mojo/public/c/system/types.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
Expand Down
2 changes: 1 addition & 1 deletion services/network/host_resolver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "base/check.h"
#include "base/optional.h"
#include "base/run_loop.h"
#include "base/test/bind_test_util.h"
Expand Down
Loading

0 comments on commit 1be837b

Please sign in to comment.