Skip to content

Commit

Permalink
Cleanup remaining class/struct fwd declarations
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
jbrianceau authored and Commit bot committed Dec 7, 2016
1 parent 16fd4e9 commit db24b9e
Show file tree
Hide file tree
Showing 85 changed files with 11 additions and 172 deletions.
4 changes: 0 additions & 4 deletions apps/app_lifetime_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions apps/ui/views/app_window_frame_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 0 additions & 4 deletions cc/output/in_process_context_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class GLInProcessContext;
class GpuMemoryBufferManager;
class ImageFactory;
struct SharedMemoryLimits;
class SyncPointManager;
namespace gles2 {
class MailboxManager;
}
}

namespace skia_bindings {
Expand Down
1 change: 0 additions & 1 deletion cc/trees/proxy_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace cc {

class BeginFrameSource;
class MutatorEvents;
class CompletionEvent;
class CompositorFrameSink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

class AccountTrackerService;
class ProfileOAuth2TokenServiceIOSProvider;
class SigninClient;

class ProfileOAuth2TokenServiceIOSDelegate : public OAuth2TokenServiceDelegate {
public:
Expand Down
1 change: 0 additions & 1 deletion courgette/courgette.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum ExecutableType {
class SinkStream;
class SinkStreamSet;
class SourceStream;
class SourceStreamSet;

class AssemblyProgram;
class EncodedProgram;
Expand Down
1 change: 0 additions & 1 deletion courgette/disassembler_elf_32_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace courgette {

class AssemblyProgram;
class InstructionReceptor;

enum ARM_RVA {
Expand Down
1 change: 0 additions & 1 deletion courgette/disassembler_elf_32_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace courgette {

class AssemblyProgram;
class InstructionReceptor;

class DisassemblerElf32X86 : public DisassemblerElf32 {
Expand Down
1 change: 0 additions & 1 deletion courgette/disassembler_win32_x64.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

namespace courgette {

class AssemblyProgram;
class InstructionReceptor;

class DisassemblerWin32X64 : public DisassemblerWin32 {
Expand Down
1 change: 0 additions & 1 deletion courgette/disassembler_win32_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

namespace courgette {

class AssemblyProgram;
class InstructionReceptor;

class DisassemblerWin32X86 : public DisassemblerWin32 {
Expand Down
1 change: 0 additions & 1 deletion crypto/nss_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "crypto/crypto_export.h"

namespace base {
class FilePath;
class Lock;
class Time;
} // namespace base
Expand Down
4 changes: 0 additions & 4 deletions dbus/bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class SingleThreadTaskRunner;
class TaskRunner;
}

namespace tracked_objects {
class Location;
}

namespace dbus {

class ExportedObject;
Expand Down
2 changes: 0 additions & 2 deletions gin/function_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

namespace gin {

class PerIsolateData;

enum CreateFunctionTemplateFlags {
HolderIsFirstArgument = 1 << 0,
};
Expand Down
1 change: 0 additions & 1 deletion google_apis/gaia/oauth2_access_token_fetcher_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Time;
namespace net {
class URLFetcher;
class URLRequestContextGetter;
class URLRequestStatus;
}

// Abstracts the details to get OAuth2 access token token from
Expand Down
3 changes: 0 additions & 3 deletions google_apis/gaia/oauth2_api_call_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions google_apis/gaia/oauth2_mint_token_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions google_apis/gaia/oauth2_token_service_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions google_apis/gcm/base/mcs_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ namespace base {
class Clock;
}

namespace net {
class StreamSocket;
}

namespace gcm {

// MCS Message tags.
Expand Down
1 change: 0 additions & 1 deletion google_apis/gcm/engine/connection_factory_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class NetLog;

namespace gcm {

class ConnectionHandlerImpl;
class GCMStatsRecorder;

class GCM_EXPORT ConnectionFactoryImpl :
Expand Down
3 changes: 0 additions & 3 deletions google_apis/gcm/engine/connection_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions google_apis/gcm/engine/connection_handler_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion headless/lib/browser/headless_browser_main_parts.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace headless {

class HeadlessBrowserContextImpl;
class HeadlessBrowserImpl;

class HeadlessBrowserMainParts : public content::BrowserMainParts {
Expand Down
2 changes: 0 additions & 2 deletions headless/lib/browser/headless_content_browser_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
namespace headless {

class HeadlessBrowserImpl;
class HeadlessBrowserMainParts;
class HeadlessDevToolsManagerDelegate;

class HeadlessContentBrowserClient : public content::ContentBrowserClient {
public:
Expand Down
1 change: 0 additions & 1 deletion headless/lib/browser/headless_devtools_manager_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
namespace headless {
class HeadlessBrowserImpl;
class HeadlessBrowserContext;
class HeadlessWebContentsImpl;

class HeadlessDevToolsManagerDelegate
: public content::DevToolsManagerDelegate {
Expand Down
1 change: 0 additions & 1 deletion headless/lib/browser/headless_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Transform;

namespace aura {
class Window;
class WindowParentingClient;
class WindowTreeHost;
}

Expand Down
9 changes: 0 additions & 9 deletions headless/lib/browser/headless_url_request_context_getter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions headless/lib/browser/headless_web_contents_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class Window;
}

namespace content {
class BrowserContext;
class DevToolsAgentHost;
class WebContents;
}
Expand All @@ -30,7 +29,6 @@ class Size;
}

namespace headless {
class HeadlessDevToolsHostImpl;
class HeadlessBrowserImpl;
class WebContentsObserverAdapter;

Expand Down
4 changes: 0 additions & 4 deletions headless/lib/headless_content_main_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion headless/public/util/deterministic_http_protocol_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion headless/public/util/http_url_fetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace net {
class URLRequestContext;
class URLRequestJobFactory;
} // namespace

namespace headless {
Expand Down
5 changes: 0 additions & 5 deletions headless/public/util/in_memory_request_job.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 0 additions & 8 deletions headless/public/util/testing/generic_url_request_mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions ipc/handle_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions ipc/ipc_channel_nacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

namespace IPC {

class MessageAttachment;

// Contains the results from one call to imc_recvmsg (data and file
// descriptors).
struct MessageContents;
Expand Down
1 change: 0 additions & 1 deletion ipc/ipc_channel_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace IPC {
class ChannelFactory;
class MessageFilter;
class MessageFilterRouter;
class SendCallbackHelper;

//-----------------------------------------------------------------------------
// IPC::ChannelProxy
Expand Down
1 change: 0 additions & 1 deletion ipc/ipc_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ChannelReader;
//------------------------------------------------------------------------------

struct LogData;
class MessageAttachment;
class MessageAttachmentSet;

class IPC_EXPORT Message : public base::Pickle {
Expand Down
2 changes: 0 additions & 2 deletions ipc/ipc_message_pipe_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion jingle/notifier/communicator/login.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "webrtc/libjingle/xmpp/xmppengine.h"

namespace buzz {
class XmppClient;
class XmppClientSettings;
class XmppTaskParentInterface;
} // namespace buzz
Expand Down
1 change: 0 additions & 1 deletion mojo/edk/system/data_pipe_consumer_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
namespace mojo {
namespace edk {

struct DataPipeControlMessage;
class NodeController;

// This is the Dispatcher implementation for the consumer handle for data
Expand Down
1 change: 0 additions & 1 deletion mojo/edk/system/data_pipe_control_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion mojo/edk/system/message_pipe_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace mojo {
namespace edk {

class NodeController;
class PortsMessage;

class MessagePipeDispatcher : public Dispatcher {
public:
Expand Down
1 change: 0 additions & 1 deletion mojo/edk/system/shared_buffer_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace mojo {

namespace edk {
class NodeController;
class PlatformSupport;

class MOJO_SYSTEM_IMPL_EXPORT SharedBufferDispatcher final : public Dispatcher {
public:
Expand Down
Loading

0 comments on commit db24b9e

Please sign in to comment.