Revert "Remove some unnecessary #includes."
This reverts commit 2813cc8490
.
Reason for revert: broke build on ios-device
https://ci.chromium.org/ui/p/chromium/builders/ci/ios-device/191116/overview
Original change's description:
> Remove some unnecessary #includes.
>
> According to
> https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html
> these were responsible for 1,460,113,428 bytes of input to the compiler,
> or roughly 0.58% of the input used to build Chrome.
>
> Bug: 242216
> Change-Id: If0380951303b3a3b01eb46f8c53dc23666bfb1b0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3010770
> Auto-Submit: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Owners-Override: danakj <danakj@chromium.org>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#899582}
Bug: 242216
Change-Id: I36238ef8ba9af7fde717baadd00d77f82b878fe2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3016036
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Owners-Override: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899587}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
01e0ac2893
commit
967583c03e
base
cc/paint
device/base/synchronization
third_party/blink/renderer/modules/webaudio
@ -875,7 +875,6 @@ component("base") {
|
||||
sources += [
|
||||
"debug/debugger_posix.cc",
|
||||
"debug/stack_trace_posix.cc",
|
||||
"file_descriptor_posix.cc",
|
||||
"file_descriptor_posix.h",
|
||||
"files/dir_reader_posix.h",
|
||||
"files/file_descriptor_watcher_posix.cc",
|
||||
@ -1616,7 +1615,6 @@ component("base") {
|
||||
"debug/elf_reader.cc",
|
||||
"debug/elf_reader.h",
|
||||
"debug/stack_trace_fuchsia.cc",
|
||||
"file_descriptor_posix.cc",
|
||||
"file_descriptor_posix.h",
|
||||
"files/dir_reader_posix.h",
|
||||
"files/file_descriptor_watcher_posix.cc",
|
||||
|
@ -1,34 +0,0 @@
|
||||
// Copyright 2021 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.
|
||||
|
||||
#include "base/file_descriptor_posix.h"
|
||||
|
||||
#include "base/files/file.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
FileDescriptor::FileDescriptor() = default;
|
||||
|
||||
FileDescriptor::FileDescriptor(int ifd, bool iauto_close)
|
||||
: fd(ifd), auto_close(iauto_close) {}
|
||||
|
||||
FileDescriptor::FileDescriptor(File file)
|
||||
: fd(file.TakePlatformFile()), auto_close(true) {}
|
||||
|
||||
FileDescriptor::FileDescriptor(ScopedFD fd)
|
||||
: fd(fd.release()), auto_close(true) {}
|
||||
|
||||
bool FileDescriptor::operator==(const FileDescriptor& other) const {
|
||||
return fd == other.fd && auto_close == other.auto_close;
|
||||
}
|
||||
|
||||
bool FileDescriptor::operator!=(const FileDescriptor& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool FileDescriptor::operator<(const FileDescriptor& other) const {
|
||||
return other.fd < fd;
|
||||
}
|
||||
|
||||
} // namespace base
|
@ -5,13 +5,11 @@
|
||||
#ifndef BASE_FILE_DESCRIPTOR_POSIX_H_
|
||||
#define BASE_FILE_DESCRIPTOR_POSIX_H_
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/files/file.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
class File;
|
||||
|
||||
constexpr int kInvalidFd = -1;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -29,24 +27,33 @@ constexpr int kInvalidFd = -1;
|
||||
// processing the IPC message. See the IPC::ParamTraits<> specialization in
|
||||
// ipc/ipc_message_utils.h for all the details.
|
||||
// -----------------------------------------------------------------------------
|
||||
struct BASE_EXPORT FileDescriptor {
|
||||
FileDescriptor();
|
||||
FileDescriptor(int ifd, bool iauto_close);
|
||||
explicit FileDescriptor(File file);
|
||||
explicit FileDescriptor(ScopedFD fd);
|
||||
struct FileDescriptor {
|
||||
FileDescriptor() : fd(kInvalidFd), auto_close(false) {}
|
||||
|
||||
bool operator==(const FileDescriptor& other) const;
|
||||
bool operator!=(const FileDescriptor& other) const;
|
||||
FileDescriptor(int ifd, bool iauto_close) : fd(ifd), auto_close(iauto_close) {
|
||||
}
|
||||
|
||||
FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {}
|
||||
explicit FileDescriptor(ScopedFD fd) : fd(fd.release()), auto_close(true) {}
|
||||
|
||||
bool operator==(const FileDescriptor& other) const {
|
||||
return (fd == other.fd && auto_close == other.auto_close);
|
||||
}
|
||||
|
||||
bool operator!=(const FileDescriptor& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
// A comparison operator so that we can use these as keys in a std::map.
|
||||
bool operator<(const FileDescriptor& other) const;
|
||||
|
||||
int fd = kInvalidFd;
|
||||
bool operator<(const FileDescriptor& other) const {
|
||||
return other.fd < fd;
|
||||
}
|
||||
|
||||
int fd;
|
||||
// If true, this file descriptor should be closed after it has been used. For
|
||||
// example an IPC system might interpret this flag as indicating that the
|
||||
// file descriptor it has been given should be closed after use.
|
||||
bool auto_close = false;
|
||||
bool auto_close;
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
@ -7,15 +7,11 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/check_op.h"
|
||||
#include "base/dcheck_is_on.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/synchronization/lock_impl.h"
|
||||
#include "base/thread_annotations.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
#include "base/threading/platform_thread.h"
|
||||
#endif
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
|
@ -12,8 +12,7 @@
|
||||
#include "cc/paint/paint_export.h"
|
||||
#include "cc/paint/paint_image.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
class SkTextBlob;
|
||||
#include "third_party/skia/include/core/SkTextBlob.h"
|
||||
|
||||
namespace printing {
|
||||
class MetafileSkia;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "base/atomicops.h"
|
||||
#include "base/check.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
|
||||
namespace device {
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "third_party/blink/renderer/modules/event_target_modules.h"
|
||||
#include "third_party/blink/renderer/modules/modules_export.h"
|
||||
#include "third_party/blink/renderer/modules/webaudio/audio_graph_tracer.h"
|
||||
#include "third_party/blink/renderer/modules/webaudio/inspector_helper_mixin.h"
|
||||
#include "third_party/blink/renderer/platform/audio/audio_bus.h"
|
||||
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
|
||||
|
Reference in New Issue
Block a user