0

Cleanup remaining class/struct fwd declarations

Remove remaining useless class and struct forward declarations from
Chromium (excluding third_party directory) using a homemade script
available in bug 662195 comments. An up-and-running presubmit check
is now available and should prevent new useless forward declarations
to come up.

BUG=662195
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_nacl_sdk

Review-Url: https://codereview.chromium.org/2554863002
Cr-Commit-Position: refs/heads/master@{#436883}
This commit is contained in:
jbriance
2016-12-06 23:06:49 -08:00
committed by Commit bot
parent 16fd4e93bc
commit db24b9e685
85 changed files with 11 additions and 172 deletions
apps
cc
components/signin/ios/browser
courgette
crypto
dbus
gin
google_apis
headless
ipc
jingle/notifier/communicator
mojo
native_client_sdk/src
pdf
printing
rlz/chromeos/lib
sandbox
skia/ext
tools
ui

@ -14,10 +14,6 @@
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/app_window/app_window_registry.h"
namespace extensions {
class Extension;
}
class Profile;
namespace apps {

@ -14,8 +14,6 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/window/non_client_view.h"
class SkRegion;
namespace extensions {
class NativeAppWindow;
}

@ -25,10 +25,6 @@ class GLInProcessContext;
class GpuMemoryBufferManager;
class ImageFactory;
struct SharedMemoryLimits;
class SyncPointManager;
namespace gles2 {
class MailboxManager;
}
}
namespace skia_bindings {

@ -13,7 +13,6 @@
namespace cc {
class BeginFrameSource;
class MutatorEvents;
class CompletionEvent;
class CompositorFrameSink;

@ -15,6 +15,7 @@
class AccountTrackerService;
class ProfileOAuth2TokenServiceIOSProvider;
class SigninClient;
class ProfileOAuth2TokenServiceIOSDelegate : public OAuth2TokenServiceDelegate {
public:

@ -63,7 +63,6 @@ enum ExecutableType {
class SinkStream;
class SinkStreamSet;
class SourceStream;
class SourceStreamSet;
class AssemblyProgram;
class EncodedProgram;

@ -16,7 +16,6 @@
namespace courgette {
class AssemblyProgram;
class InstructionReceptor;
enum ARM_RVA {

@ -16,7 +16,6 @@
namespace courgette {
class AssemblyProgram;
class InstructionReceptor;
class DisassemblerElf32X86 : public DisassemblerElf32 {

@ -15,7 +15,6 @@
namespace courgette {
class AssemblyProgram;
class InstructionReceptor;
class DisassemblerWin32X64 : public DisassemblerWin32 {

@ -15,7 +15,6 @@
namespace courgette {
class AssemblyProgram;
class InstructionReceptor;
class DisassemblerWin32X86 : public DisassemblerWin32 {

@ -14,7 +14,6 @@
#include "crypto/crypto_export.h"
namespace base {
class FilePath;
class Lock;
class Time;
} // namespace base

@ -28,10 +28,6 @@ class SingleThreadTaskRunner;
class TaskRunner;
}
namespace tracked_objects {
class Location;
}
namespace dbus {
class ExportedObject;

@ -17,8 +17,6 @@
namespace gin {
class PerIsolateData;
enum CreateFunctionTemplateFlags {
HolderIsFirstArgument = 1 << 0,
};

@ -25,7 +25,6 @@ class Time;
namespace net {
class URLFetcher;
class URLRequestContextGetter;
class URLRequestStatus;
}
// Abstracts the details to get OAuth2 access token token from

@ -13,9 +13,6 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
class GoogleServiceAuthError;
class OAuth2MintTokenFlowTest;
namespace net {
class URLFetcher;
class URLRequestContextGetter;

@ -26,10 +26,6 @@ namespace content {
class URLFetcher;
}
namespace net {
class URLRequestContextGetter;
}
// IssueAdvice: messages to show to the user to get a user's approval.
// The structure is as follows:
// * Description 1

@ -15,8 +15,6 @@ namespace net {
class URLRequestContextGetter;
}
class SigninClient;
// Abstract base class to fetch and maintain refresh tokens from various
// entities. Concrete subclasses should implement RefreshTokenIsAvailable and
// CreateAccessTokenFetcher properly.

@ -21,10 +21,6 @@ namespace base {
class Clock;
}
namespace net {
class StreamSocket;
}
namespace gcm {
// MCS Message tags.

@ -30,7 +30,6 @@ class NetLog;
namespace gcm {
class ConnectionHandlerImpl;
class GCMStatsRecorder;
class GCM_EXPORT ConnectionFactoryImpl :

@ -26,9 +26,6 @@ class LoginRequest;
namespace gcm {
class SocketInputStream;
class SocketOutputStream;
// Handles performing the protocol handshake and sending/receiving protobuf
// messages. Note that no retrying or queueing is enforced at this layer.
// Once a connection error is encountered, the ConnectionHandler will disconnect

@ -21,6 +21,9 @@ class LoginRequest;
namespace gcm {
class SocketInputStream;
class SocketOutputStream;
class GCM_EXPORT ConnectionHandlerImpl : public ConnectionHandler {
public:
// |read_callback| will be invoked with the contents of any received protobuf

@ -12,7 +12,6 @@
namespace headless {
class HeadlessBrowserContextImpl;
class HeadlessBrowserImpl;
class HeadlessBrowserMainParts : public content::BrowserMainParts {

@ -10,8 +10,6 @@
namespace headless {
class HeadlessBrowserImpl;
class HeadlessBrowserMainParts;
class HeadlessDevToolsManagerDelegate;
class HeadlessContentBrowserClient : public content::ContentBrowserClient {
public:

@ -17,7 +17,6 @@
namespace headless {
class HeadlessBrowserImpl;
class HeadlessBrowserContext;
class HeadlessWebContentsImpl;
class HeadlessDevToolsManagerDelegate
: public content::DevToolsManagerDelegate {

@ -19,7 +19,6 @@ class Transform;
namespace aura {
class Window;
class WindowParentingClient;
class WindowTreeHost;
}

@ -19,18 +19,9 @@
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_job_factory.h"
namespace base {
class MessageLoop;
}
namespace net {
class HostResolver;
class MappedHostResolver;
class NetworkDelegate;
class NetLog;
class ProxyConfigService;
class ProxyService;
class URLRequestContextStorage;
}
namespace headless {

@ -20,7 +20,6 @@ class Window;
}
namespace content {
class BrowserContext;
class DevToolsAgentHost;
class WebContents;
}
@ -30,7 +29,6 @@ class Size;
}
namespace headless {
class HeadlessDevToolsHostImpl;
class HeadlessBrowserImpl;
class WebContentsObserverAdapter;

@ -12,10 +12,6 @@
#include "content/public/app/content_main_delegate.h"
#include "headless/lib/headless_content_client.h"
namespace content {
class BrowserContext;
}
namespace headless {
class HeadlessBrowserImpl;

@ -17,7 +17,6 @@ class URLRequestJobFactory;
namespace headless {
class DeterministicDispatcher;
class HeadlessBrowserContext;
// A deterministic protocol handler. Requests made to this protocol handler
// will return in order of creation, regardless of what order the network

@ -10,7 +10,6 @@
namespace net {
class URLRequestContext;
class URLRequestJobFactory;
} // namespace
namespace headless {

@ -9,11 +9,6 @@
#include "headless/public/util/in_memory_protocol_handler.h"
#include "net/url_request/url_request_job.h"
namespace net {
class StringIOBuffer;
class DrainableIOBuffer;
}
namespace headless {
class InMemoryRequestJob : public net::URLRequestJob {
public:

@ -16,14 +16,6 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_job_factory.h"
namespace net {
class URLRequestJob;
} // namespace net
namespace htmlrender_webkit_headless_proto {
class Resource;
} // htmlrender_webkit_headless_proto net
namespace headless {
class MockGenericURLRequestJobDelegate : public GenericURLRequestJob::Delegate {

@ -19,8 +19,6 @@ class PickleIterator;
namespace IPC {
class Message;
// HandleWin is a wrapper around a Windows HANDLE that can be transported
// across Chrome IPC channels that support attachment brokering. The HANDLE will
// be duplicated into the destination process.

@ -19,6 +19,8 @@
namespace IPC {
class MessageAttachment;
// Contains the results from one call to imc_recvmsg (data and file
// descriptors).
struct MessageContents;

@ -34,7 +34,6 @@ namespace IPC {
class ChannelFactory;
class MessageFilter;
class MessageFilterRouter;
class SendCallbackHelper;
//-----------------------------------------------------------------------------
// IPC::ChannelProxy

@ -30,7 +30,6 @@ class ChannelReader;
//------------------------------------------------------------------------------
struct LogData;
class MessageAttachment;
class MessageAttachmentSet;
class IPC_EXPORT Message : public base::Pickle {

@ -26,8 +26,6 @@
namespace IPC {
namespace internal {
class AsyncHandleWaiter;
// A helper class to handle bytestream directly over mojo::MessagePipe
// in template-method pattern. MessagePipeReader manages the lifetime
// of given MessagePipe and participates the event loop, and

@ -21,7 +21,6 @@
#include "webrtc/libjingle/xmpp/xmppengine.h"
namespace buzz {
class XmppClient;
class XmppClientSettings;
class XmppTaskParentInterface;
} // namespace buzz

@ -24,7 +24,6 @@
namespace mojo {
namespace edk {
struct DataPipeControlMessage;
class NodeController;
// This is the Dispatcher implementation for the consumer handle for data

@ -17,7 +17,6 @@ namespace mojo {
namespace edk {
class NodeController;
class PortsMessage;
enum DataPipeCommand : uint32_t {
// Signal to the consumer that new data is available.

@ -21,7 +21,6 @@ namespace mojo {
namespace edk {
class NodeController;
class PortsMessage;
class MessagePipeDispatcher : public Dispatcher {
public:

@ -21,7 +21,6 @@ namespace mojo {
namespace edk {
class NodeController;
class PlatformSupport;
class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final : public Dispatcher {
public:

@ -19,7 +19,6 @@
namespace mojo {
namespace edk {
class PlatformChannelPair;
namespace test {

@ -37,8 +37,6 @@ class SingleThreadTaskRunner;
namespace mojo {
class AssociatedGroup;
namespace internal {
// MultiplexRouter supports routing messages for multiple interfaces over a

@ -14,7 +14,6 @@
namespace mojo {
namespace internal {
class Buffer;
class ValidationContext;
class MOJO_CPP_BINDINGS_EXPORT NativeStruct_Data {

@ -10,8 +10,6 @@
namespace nacl_io {
class Node;
class DevFs : public Filesystem {
public:
virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode,

@ -13,12 +13,6 @@
namespace nacl_io {
class MessagingInterface;
class VarInterface;
class VarArrayInterface;
class VarArrayBufferInterface;
class VarDictionaryInterface;
/**
* JSPipeNode represents a two-way channel for communicating with JavaScript
* via calls to PostMessage. In order to use these some amount of logic on

@ -13,8 +13,6 @@
namespace nacl_io {
class PepperInterface;
class FsFactory {
public:
virtual ~FsFactory() {}

@ -28,8 +28,6 @@ class KernelProxy;
}
#endif
struct fuse_operations;
/*
* The kernel intercept module provides a C->C++ thunk between the libc
* kernel calls and the KernelProxy singleton.

@ -16,7 +16,6 @@
namespace nacl_io {
class TcpEventEmitter;
class Node;
typedef sdk_util::ScopedRef<TcpEventEmitter> ScopedTcpEventEmitter;

@ -15,7 +15,6 @@
namespace nacl_io {
class UnixEventEmitter;
class Node;
typedef sdk_util::ScopedRef<UnixEventEmitter> ScopedUnixEventEmitter;

@ -17,7 +17,6 @@ namespace nacl_io {
// a background thread for dispatching completion callbacks.
class StreamFs;
class StreamNode;
class StreamFs : public Filesystem {
public:

@ -15,7 +15,6 @@
#include "sdk_util/macros.h"
class FakePepperInterface;
class FakeVarManager;
class FakeHostResolverInterface : public nacl_io::HostResolverInterface {
public:

@ -10,7 +10,6 @@
#include "nacl_io/pepper_interface.h"
#include "sdk_util/macros.h"
class FakeVarManager;
class FakePepperInterface;
class FakeNetAddressInterface : public nacl_io::NetAddressInterface {

@ -42,8 +42,6 @@ class VarDictionary;
namespace chrome_pdf {
class Stream;
// Do one time initialization of the SDK.
bool InitializeSDK();
// Tells the SDK that we're shutting down.

@ -34,7 +34,6 @@
namespace pp {
class KeyboardInputEvent;
class MouseInputEvent;
class VarDictionary;
}
namespace chrome_pdf {

@ -14,10 +14,6 @@
#include "printing/backend/cups_printer.h"
#include "printing/printing_context.h"
namespace base {
class DictionaryValue;
}
namespace printing {
class PRINTING_EXPORT PrintingContextChromeos : public PrintingContext {

@ -10,10 +10,6 @@
#include "base/macros.h"
#include "printing/printing_context.h"
namespace base {
class DictionaryValue;
}
namespace printing {
class MetafilePlayer;

@ -10,10 +10,6 @@
#include "base/macros.h"
#include "printing/printing_context.h"
namespace base {
class DictionaryValue;
}
namespace printing {
class PRINTING_EXPORT PrintingContextNoSystemDialog : public PrintingContext {

@ -17,7 +17,6 @@
#include "rlz/lib/rlz_value_store.h"
namespace base {
class ListValue;
class SequencedTaskRunner;
class Value;
}

@ -76,6 +76,11 @@
namespace sandbox {
namespace bpf_dsl {
template <typename T>
class Caser;
class Elser;
// ResultExpr is an opaque reference to an immutable result expression tree.
using ResultExpr = std::shared_ptr<const internal::ResultExprImpl>;

@ -24,14 +24,6 @@ class BoolExprImpl;
using ResultExpr = std::shared_ptr<const internal::ResultExprImpl>;
using BoolExpr = std::shared_ptr<const internal::BoolExprImpl>;
template <typename T>
class Arg;
class Elser;
template <typename T>
class Caser;
} // namespace bpf_dsl
} // namespace sandbox

@ -13,7 +13,6 @@
namespace sandbox {
namespace bpf_dsl {
class ErrorCode;
class PolicyCompiler;
namespace internal {

@ -29,8 +29,6 @@ struct JobTracker;
namespace sandbox {
class PolicyBase;
// BrokerServicesBase ---------------------------------------------------------
// Broker implementation version 0
//

@ -28,7 +28,6 @@ class StartupInformation;
namespace sandbox {
class AttributeList;
class SharedMemIPCServer;
class ThreadProvider;

@ -17,7 +17,6 @@
#include "third_party/skia/include/core/SkTypes.h"
class SkMatrix;
class SkPath;
namespace skia {

@ -15,7 +15,6 @@
namespace base {
namespace trace_event {
class MemoryAllocatorDump;
class ProcessMemoryDump;
}
}

@ -13,7 +13,6 @@
#include "third_party/skia/include/core/SkPixmap.h"
struct SkIRect;
struct SkPoint;
struct SkRect;
class SkCanvas;
class SkMatrix;

@ -9,7 +9,6 @@
#include "Edge.h"
struct BlinkGCPluginOptions;
class FieldPoint;
// This visitor checks that the fields of a class are "well formed".

@ -14,7 +14,6 @@
#include "tools/gn/label_ptr.h"
#include "tools/gn/unique_vector.h"
class Config;
class Err;
class Loader;
class ParseNode;

@ -11,7 +11,6 @@
class ConfigValues;
class Err;
class Scope;
class Token;
// This class fills in the config values from a given scope. It's shared
// between the "config" function call and all the different binary target types

@ -9,8 +9,6 @@
#include "tools/gn/label_ptr.h"
class Target;
// Provides an iterator for iterating over multiple LabelTargetVectors to
// make it convenient to iterate over all deps of a target.
//

@ -15,8 +15,6 @@
#include "tools/gn/target.h"
class Err;
class Location;
class Value;
std::string FilePathToUTF8(const base::FilePath::StringType& str);
inline std::string FilePathToUTF8(const base::FilePath& path) {

@ -18,7 +18,6 @@ class Label;
class ListNode;
class ParseNode;
class Scope;
class Token;
class Value;
// -----------------------------------------------------------------------------

@ -19,7 +19,6 @@
class BuildSettings;
class InputFile;
class Label;
class LocationRange;
class SourceFile;
class Target;

@ -15,7 +15,6 @@
class Builder;
class BuildSettings;
class Err;
class Pool;
class Settings;
class Target;
class Toolchain;

@ -8,8 +8,6 @@
#include "base/macros.h"
#include "tools/gn/ninja_target_writer.h"
class Tool;
// Writes a .ninja file for a copy target type.
class NinjaCopyTargetWriter : public NinjaTargetWriter {
public:

@ -11,7 +11,6 @@
#include "tools/gn/path_output.h"
#include "tools/gn/substitution_type.h"
class FileTemplate;
class OutputFile;
class Settings;
class Target;

@ -16,10 +16,8 @@
#include "tools/gn/path_output.h"
#include "tools/gn/toolchain.h"
class BuildSettings;
struct EscapeOptions;
class Settings;
class Target;
class Tool;
class NinjaToolchainWriter {

@ -15,8 +15,6 @@
class Builder;
class BuildSettings;
class Err;
class Pool;
class Settings;
class Target;
class Toolchain;

@ -19,12 +19,9 @@
#include "tools/gn/source_dir.h"
#include "tools/gn/value.h"
class FunctionCallNode;
class ImportManager;
class Item;
class ParseNode;
class Settings;
class TargetManager;
class Template;
// Scope for the script execution.

@ -27,9 +27,7 @@
#include "tools/gn/unique_vector.h"
class DepsIteratorRange;
class InputFile;
class Settings;
class Token;
class Toolchain;
class Target : public Item {

@ -22,10 +22,6 @@ class Target;
using PBXAttributes = std::map<std::string, std::string>;
class PBXProject;
namespace base {
class FilePath;
}
class XcodeWriter {
public:
enum TargetOsType {

@ -8,10 +8,6 @@
#include <jni.h>
#include "ui/android/ui_android_export.h"
namespace display {
class Screen;
}
namespace ui {
bool RegisterScreenAndroid(JNIEnv* env);

@ -14,9 +14,6 @@
namespace aura {
class WindowTreeClient;
namespace client {
class CaptureClient;
}
}
namespace ui {