Skip to content

Commit

Permalink
Remove/replace unnecessary includes of logging.h (components/)
Browse files Browse the repository at this point in the history
If the file just needs the CHECK/CHECK_OP/NOTREACHED
macros, use the appropriate header for that instead.
Or if logging.h is not needed at all, remove it.

This is both a nice cleanup (logging.h is a big header,
and including it unnecessarily has compile-time costs),
and part of the final step towards making logging.h no
longer include check.h and the others.

Bug: 1031540
Change-Id: Ibeb7cc26e331161c5a1490b84ef5a59ecd122413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2254029
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781841}
  • Loading branch information
zmodem authored and Commit Bot committed Jun 24, 2020
1 parent cdf665d commit 29c74d3
Show file tree
Hide file tree
Showing 75 changed files with 52 additions and 75 deletions.
2 changes: 1 addition & 1 deletion components/autofill/core/browser/webdata/autofill_change.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>
#include <vector>

#include "base/logging.h"
#include "base/check.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/webdata/autofill_entry.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_DEVTOOLS_DEVTOOLS_INTERNAL_TYPE_CONVERSIONS_{{domain.domain | camelcase_to_hacker_style | upper}}_H_
#define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_DEVTOOLS_DEVTOOLS_INTERNAL_TYPE_CONVERSIONS_{{domain.domain | camelcase_to_hacker_style | upper}}_H_

#include "base/logging.h"
#include "base/notreached.h"
#include "components/autofill_assistant/browser/devtools/devtools/domains/types_{{domain.domain | camelcase_to_hacker_style}}.h"
#include "components/autofill_assistant/browser/devtools/value_conversions.h"

Expand Down
2 changes: 1 addition & 1 deletion components/bookmarks/browser/bookmark_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <set>
#include <vector>

#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/macros.h"
#include "third_party/crashpad/crashpad/handler/user_stream_data_source.h"

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

#include <list>

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

Expand Down
1 change: 0 additions & 1 deletion components/cast_channel/enum_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <cstring>

#include "base/check_op.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/notreached.h"
#include "base/optional.h"
Expand Down
3 changes: 2 additions & 1 deletion components/cbor/values.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
#include <tuple>
#include <vector>

#include "base/check.h"
#include "base/containers/flat_map.h"
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/notreached.h"
#include "base/strings/string_piece.h"
#include "components/cbor/cbor_export.h"

Expand Down
2 changes: 1 addition & 1 deletion components/cloud_devices/common/description_items.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <utility>
#include <vector>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/stl_util.h"
Expand Down
1 change: 0 additions & 1 deletion components/cloud_devices/common/printer_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>
#include <vector>

#include "base/logging.h"
#include "build/build_config.h"
#include "components/cloud_devices/common/description_items.h"

Expand Down
1 change: 0 additions & 1 deletion components/content_settings/core/browser/uma_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_UMA_UTIL_H_
#define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_UMA_UTIL_H_

#include "base/logging.h"
#include "base/macros.h"
#include "components/content_settings/core/common/content_settings.h"

Expand Down
1 change: 0 additions & 1 deletion components/content_settings/core/common/pref_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PREF_NAMES_H_
#define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_PREF_NAMES_H_

#include "base/logging.h"

namespace prefs {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +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 "base/check.h"
#include "base/synchronization/waitable_event.h"
#include "cronet_c.h"

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

#include "{{variant_path}}_impl_interface.h"

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

{#--- Interface Stubs -#}
{% for interface in interfaces %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "{{variant_path}}_c.h"

#include "base/logging.h"
#include "base/check.h"
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"

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

#include <utility>

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

{%- for struct in structs %}
{%- set struct_name = struct|get_name_for_kind %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include <math.h>

#include "base/logging.h"
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion components/download/public/common/base_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

#include "base/callback.h"
#include "base/callback_forward.h"
#include "base/check.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/optional.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/android/jni_weak_ref.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/android/compositor_client.h"
Expand Down
2 changes: 1 addition & 1 deletion components/exo/wayland/fuzzer/harness.cc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <cstring>
#include <functional>

#include "base/logging.h"
#include "base/check.h"
#include "components/exo/wayland/fuzzer/actions.pb.h"

namespace exo {
Expand Down
2 changes: 1 addition & 1 deletion components/gcm_driver/crypto/message_payload_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <stdint.h>

#include "base/logging.h"
#include "base/check.h"
#include "base/macros.h"
#include "base/optional.h"
#include "base/strings/string_piece.h"
Expand Down
2 changes: 1 addition & 1 deletion components/history/core/browser/history_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/callback_list.h"
#include "base/check.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "components/media_message_center/vector_icons/vector_icons.h"

#include "base/logging.h"
#include "components/vector_icons/cc_macros.h"
#include "ui/gfx/vector_icon_types.h"

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

#include <memory>

#include "base/logging.h"
#include "base/check.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/prefs/pref_service.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "components/omnibox/browser/vector_icons.h"

#include "base/logging.h"
#include "components/vector_icons/cc_macros.h"
#include "ui/gfx/vector_icon_types.h"

Expand Down
1 change: 0 additions & 1 deletion components/optimization_guide/url_pattern_with_wildcards.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>
#include <vector>

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

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

#include <bitset>
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/macros.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <string>
#include <vector>

#include "base/logging.h"
#include "base/check.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "url/gurl.h"
Expand Down
2 changes: 1 addition & 1 deletion components/payments/content/android/byte_buffer_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <vector>

#include "base/android/scoped_java_ref.h"
#include "base/logging.h"
#include "base/check.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"

namespace payments {
Expand Down
2 changes: 1 addition & 1 deletion components/performance_manager/graph/node_attached_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <memory>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/macros.h"
#include "components/performance_manager/graph/node_base.h"
#include "components/performance_manager/public/graph/node_attached_data.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <type_traits>
#include <utility>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/memory/ptr_util.h"
#include "components/performance_manager/graph/node_attached_data.h"

Expand Down
2 changes: 1 addition & 1 deletion components/performance_manager/owned_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

#include <memory>

#include "base/check_op.h"
#include "base/containers/flat_set.h"
#include "base/containers/unique_ptr_adapters.h"
#include "base/logging.h"
#include "base/stl_util.h"

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

#include <memory>

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

namespace performance_manager {
Expand Down
2 changes: 1 addition & 1 deletion components/performance_manager/registered_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <type_traits>

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

namespace performance_manager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <memory>
#include <string>

#include "base/check_op.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/observer_list.h"
#include "base/scoped_observer.h"
#include "content/public/browser/service_worker_context.h"
Expand Down
2 changes: 1 addition & 1 deletion components/performance_manager/worker_watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <memory>
#include <string>

#include "base/check_op.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/scoped_observer.h"
#include "base/sequence_checker.h"
Expand Down
2 changes: 1 addition & 1 deletion components/policy/core/common/cloud/dm_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <memory>
#include <string>

#include "base/logging.h"
#include "base/check_op.h"
#include "base/macros.h"
#include "components/policy/policy_export.h"

Expand Down
2 changes: 1 addition & 1 deletion components/policy/core/common/cloud/policy_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <string>
#include <vector>

#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/macros.h"
#include "build/build_config.h"
#include "components/account_id/account_id.h"
Expand Down
1 change: 0 additions & 1 deletion components/policy/core/common/schema_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "components/policy/core/common/schema_map.h"

#include "base/logging.h"
#include "base/values.h"
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_map.h"
Expand Down
2 changes: 1 addition & 1 deletion components/policy/tools/generate_policy_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ def _WritePolicyConstantSource(policies, policy_atomic_groups, target_platform,
#include <climits>
#include <memory>
#include "base/logging.h"
#include "base/check_op.h"
#include "base/stl_util.h" // base::size()
#include "build/branding_buildflags.h"
#include "components/policy/core/common/policy_types.h"
Expand Down
2 changes: 1 addition & 1 deletion components/prefs/pref_member.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

#include "base/bind.h"
#include "base/callback_forward.h"
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
Expand Down
2 changes: 1 addition & 1 deletion components/previews/core/previews_experiments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/notreached.h"
#include "base/optional.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include <vector>

#include "base/callback.h"
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/containers/flat_map.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/numerics/checked_math.h"
Expand Down
1 change: 0 additions & 1 deletion components/services/storage/indexed_db/scopes/scope_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "base/callback.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/macros.h"
#include "components/services/storage/indexed_db/scopes/scope_lock_range.h"
#include "third_party/leveldatabase/src/include/leveldb/comparator.h"
Expand Down
Loading

0 comments on commit 29c74d3

Please sign in to comment.