Skip to content

Commit

Permalink
Update {virtual,override} to follow C++11 style in remoting.
Browse files Browse the repository at this point in the history
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.

This patch was manually generated using a regex and a text editor.

BUG=417463

Review URL: https://codereview.chromium.org/1101033002

Cr-Commit-Position: refs/heads/master@{#326582}
  • Loading branch information
nick-chromium authored and Commit bot committed Apr 23, 2015
1 parent 98f2490 commit 697f429
Show file tree
Hide file tree
Showing 39 changed files with 170 additions and 170 deletions.
4 changes: 2 additions & 2 deletions remoting/base/breakpad_win_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ void InitializeCrashReportingForTest(const wchar_t* pipe_name);
class BreakpadWinDeathTest : public testing::Test {
public:
BreakpadWinDeathTest();
virtual ~BreakpadWinDeathTest();
~BreakpadWinDeathTest() override;

virtual void SetUp() override;
void SetUp() override;

protected:
scoped_ptr<google_breakpad::CrashGenerationServer> crash_server_;
Expand Down
2 changes: 1 addition & 1 deletion remoting/client/plugin/pepper_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace remoting {

class ChromotingModule : public pp::Module {
protected:
virtual pp::Instance* CreateInstance(PP_Instance instance) override {
pp::Instance* CreateInstance(PP_Instance instance) override {
pp::Instance* result = new ChromotingInstance(instance);
return result;
}
Expand Down
4 changes: 2 additions & 2 deletions remoting/host/audio_capturer_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ namespace remoting {
class AudioCapturerWin : public AudioCapturer {
public:
AudioCapturerWin();
virtual ~AudioCapturerWin();
~AudioCapturerWin() override;

// AudioCapturer interface.
virtual bool Start(const PacketCapturedCallback& callback) override;
bool Start(const PacketCapturedCallback& callback) override;

private:
// Receives all packets from the audio capture endpoint buffer and pushes them
Expand Down
2 changes: 1 addition & 1 deletion remoting/host/chromeos/aura_desktop_capturer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AuraDesktopCapturerTest : public testing::Test,
public:
AuraDesktopCapturerTest() {}

virtual void SetUp() override;
void SetUp() override;

MOCK_METHOD1(CreateSharedMemory, webrtc::SharedMemory*(size_t size));
MOCK_METHOD1(OnCaptureCompleted, void(webrtc::DesktopFrame* frame));
Expand Down
4 changes: 2 additions & 2 deletions remoting/host/clipboard_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ class ClipboardWin : public Clipboard {
ClipboardWin();
~ClipboardWin() override;

virtual void Start(
void Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
virtual void InjectClipboardEvent(
void InjectClipboardEvent(
const protocol::ClipboardEvent& event) override;

private:
Expand Down
6 changes: 3 additions & 3 deletions remoting/host/continue_window_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ namespace {
class ContinueWindowWin : public ContinueWindow {
public:
ContinueWindowWin();
virtual ~ContinueWindowWin();
~ContinueWindowWin() override;

protected:
// ContinueWindow overrides.
virtual void ShowUi() override;
virtual void HideUi() override;
void ShowUi() override;
void HideUi() override;

private:
static BOOL CALLBACK DialogProc(HWND hwmd, UINT msg, WPARAM wParam,
Expand Down
2 changes: 1 addition & 1 deletion remoting/host/curtain_mode_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CurtainModeWin : public CurtainMode {
CurtainModeWin();

// Overriden from CurtainMode.
virtual bool Activate() override;
bool Activate() override;

private:
DISALLOW_COPY_AND_ASSIGN(CurtainModeWin);
Expand Down
8 changes: 4 additions & 4 deletions remoting/host/daemon_process_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ class MockDaemonProcess : public DaemonProcess {
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
scoped_refptr<AutoThreadTaskRunner> io_task_runner,
const base::Closure& stopped_callback);
virtual ~MockDaemonProcess();
~MockDaemonProcess() override;

virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
scoped_ptr<DesktopSession> DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) override;

virtual bool OnMessageReceived(const IPC::Message& message) override;
virtual void SendToNetwork(IPC::Message* message) override;
bool OnMessageReceived(const IPC::Message& message) override;
void SendToNetwork(IPC::Message* message) override;

MOCK_METHOD1(Received, void(const IPC::Message&));
MOCK_METHOD1(Sent, void(const IPC::Message&));
Expand Down
16 changes: 8 additions & 8 deletions remoting/host/daemon_process_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,28 @@ class DaemonProcessWin : public DaemonProcess {
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
scoped_refptr<AutoThreadTaskRunner> io_task_runner,
const base::Closure& stopped_callback);
virtual ~DaemonProcessWin();
~DaemonProcessWin() override;

// WorkerProcessIpcDelegate implementation.
virtual void OnChannelConnected(int32 peer_pid) override;
virtual void OnPermanentError(int exit_code) override;
void OnChannelConnected(int32 peer_pid) override;
void OnPermanentError(int exit_code) override;

// DaemonProcess overrides.
virtual void SendToNetwork(IPC::Message* message) override;
virtual bool OnDesktopSessionAgentAttached(
void SendToNetwork(IPC::Message* message) override;
bool OnDesktopSessionAgentAttached(
int terminal_id,
base::ProcessHandle desktop_process,
IPC::PlatformFileForTransit desktop_pipe) override;

protected:
// DaemonProcess implementation.
virtual scoped_ptr<DesktopSession> DoCreateDesktopSession(
scoped_ptr<DesktopSession> DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) override;
virtual void DoCrashNetworkProcess(
void DoCrashNetworkProcess(
const tracked_objects::Location& location) override;
virtual void LaunchNetworkProcess() override;
void LaunchNetworkProcess() override;

// Changes the service start type to 'manual'.
void DisableAutoStart();
Expand Down
8 changes: 4 additions & 4 deletions remoting/host/desktop_process_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ namespace {
class MockDaemonListener : public IPC::Listener {
public:
MockDaemonListener() {}
virtual ~MockDaemonListener() {}
~MockDaemonListener() override {}

virtual bool OnMessageReceived(const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message) override;

MOCK_METHOD1(OnDesktopAttached, void(IPC::PlatformFileForTransit));
MOCK_METHOD1(OnChannelConnected, void(int32));
Expand All @@ -56,9 +56,9 @@ class MockDaemonListener : public IPC::Listener {
class MockNetworkListener : public IPC::Listener {
public:
MockNetworkListener() {}
virtual ~MockNetworkListener() {}
~MockNetworkListener() override {}

virtual bool OnMessageReceived(const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message) override;

MOCK_METHOD1(OnChannelConnected, void(int32));
MOCK_METHOD0(OnChannelError, void());
Expand Down
10 changes: 5 additions & 5 deletions remoting/host/desktop_resizer_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ static inline bool operator <(const ScreenResolution& a,
class DesktopResizerWin : public DesktopResizer {
public:
DesktopResizerWin();
virtual ~DesktopResizerWin();
~DesktopResizerWin() override;

// DesktopResizer interface.
virtual ScreenResolution GetCurrentResolution() override;
virtual std::list<ScreenResolution> GetSupportedResolutions(
ScreenResolution GetCurrentResolution() override;
std::list<ScreenResolution> GetSupportedResolutions(
const ScreenResolution& preferred) override;
virtual void SetResolution(const ScreenResolution& resolution) override;
virtual void RestoreResolution(const ScreenResolution& original) override;
void SetResolution(const ScreenResolution& resolution) override;
void RestoreResolution(const ScreenResolution& original) override;

private:
static bool IsResizeSupported();
Expand Down
12 changes: 6 additions & 6 deletions remoting/host/desktop_session_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ class ConsoleSession : public DesktopSessionWin {
DaemonProcess* daemon_process,
int id,
WtsTerminalMonitor* monitor);
virtual ~ConsoleSession();
~ConsoleSession() override;

protected:
// DesktopSession overrides.
virtual void SetScreenResolution(const ScreenResolution& resolution) override;
void SetScreenResolution(const ScreenResolution& resolution) override;

// DesktopSessionWin overrides.
virtual void InjectSas() override;
void InjectSas() override;

private:
scoped_ptr<SasInjector> sas_injector_;
Expand All @@ -119,7 +119,7 @@ class RdpSession : public DesktopSessionWin {
DaemonProcess* daemon_process,
int id,
WtsTerminalMonitor* monitor);
virtual ~RdpSession();
~RdpSession() override;

// Performs the part of initialization that can fail.
bool Initialize(const ScreenResolution& resolution);
Expand All @@ -130,10 +130,10 @@ class RdpSession : public DesktopSessionWin {

protected:
// DesktopSession overrides.
virtual void SetScreenResolution(const ScreenResolution& resolution) override;
void SetScreenResolution(const ScreenResolution& resolution) override;

// DesktopSessionWin overrides.
virtual void InjectSas() override;
void InjectSas() override;

private:
// An implementation of IRdpDesktopSessionEventHandler interface that forwards
Expand Down
12 changes: 6 additions & 6 deletions remoting/host/desktop_session_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class DesktopSessionWin
DaemonProcess* daemon_process,
int id,
WtsTerminalMonitor* monitor);
virtual ~DesktopSessionWin();
~DesktopSessionWin() override;

const scoped_refptr<AutoThreadTaskRunner>& caller_task_runner() const {
return caller_task_runner_;
Expand All @@ -85,13 +85,13 @@ class DesktopSessionWin
virtual void InjectSas() = 0;

// WorkerProcessIpcDelegate implementation.
virtual void OnChannelConnected(int32 peer_pid) override;
virtual bool OnMessageReceived(const IPC::Message& message) override;
virtual void OnPermanentError(int exit_code) override;
void OnChannelConnected(int32 peer_pid) override;
bool OnMessageReceived(const IPC::Message& message) override;
void OnPermanentError(int exit_code) override;

// WtsTerminalObserver implementation.
virtual void OnSessionAttached(uint32 session_id) override;
virtual void OnSessionDetached() override;
void OnSessionAttached(uint32 session_id) override;
void OnSessionDetached() override;

private:
// ChromotingDesktopDaemonMsg_DesktopAttached handler.
Expand Down
4 changes: 2 additions & 2 deletions remoting/host/disconnect_window_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const int kWindowTextMargin = 8;
class DisconnectWindowWin : public HostWindow {
public:
DisconnectWindowWin();
virtual ~DisconnectWindowWin();
~DisconnectWindowWin() override;

// HostWindow overrides.
virtual void Start(
void Start(
const base::WeakPtr<ClientSessionControl>& client_session_control)
override;

Expand Down
6 changes: 3 additions & 3 deletions remoting/host/gnubby_auth_handler_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace {
class GnubbyAuthHandlerWin : public GnubbyAuthHandler {
private:
// GnubbyAuthHandler interface.
virtual void DeliverClientMessage(const std::string& message) override;
virtual void DeliverHostDataMessage(int connection_id,
const std::string& data) const override;
void DeliverClientMessage(const std::string& message) override;
void DeliverHostDataMessage(int connection_id,
const std::string& data) const override;

DISALLOW_COPY_AND_ASSIGN(GnubbyAuthHandlerWin);
};
Expand Down
14 changes: 7 additions & 7 deletions remoting/host/host_event_logger_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ class HostEventLoggerWin : public HostEventLogger, public HostStatusObserver {
HostEventLoggerWin(base::WeakPtr<HostStatusMonitor> monitor,
const std::string& application_name);

virtual ~HostEventLoggerWin();
~HostEventLoggerWin() override;

// HostStatusObserver implementation. These methods will be called from the
// network thread.
virtual void OnClientAuthenticated(const std::string& jid) override;
virtual void OnClientDisconnected(const std::string& jid) override;
virtual void OnAccessDenied(const std::string& jid) override;
virtual void OnClientRouteChange(
void OnClientAuthenticated(const std::string& jid) override;
void OnClientDisconnected(const std::string& jid) override;
void OnAccessDenied(const std::string& jid) override;
void OnClientRouteChange(
const std::string& jid,
const std::string& channel_name,
const protocol::TransportRoute& route) override;
virtual void OnStart(const std::string& xmpp_login) override;
virtual void OnShutdown() override;
void OnStart(const std::string& xmpp_login) override;
void OnShutdown() override;

private:
void LogString(WORD type, DWORD event_id, const std::string& string);
Expand Down
30 changes: 15 additions & 15 deletions remoting/host/host_mock_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace remoting {
class MockDesktopEnvironment : public DesktopEnvironment {
public:
MockDesktopEnvironment();
virtual ~MockDesktopEnvironment();
~MockDesktopEnvironment() override;

MOCK_METHOD0(CreateAudioCapturerPtr, AudioCapturer*());
MOCK_METHOD0(CreateInputInjectorPtr, InputInjector*());
Expand All @@ -43,20 +43,20 @@ class MockDesktopEnvironment : public DesktopEnvironment {
protocol::ClientStub* client_stub));

// DesktopEnvironment implementation.
virtual scoped_ptr<AudioCapturer> CreateAudioCapturer() override;
virtual scoped_ptr<InputInjector> CreateInputInjector() override;
virtual scoped_ptr<ScreenControls> CreateScreenControls() override;
virtual scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
scoped_ptr<AudioCapturer> CreateAudioCapturer() override;
scoped_ptr<InputInjector> CreateInputInjector() override;
scoped_ptr<ScreenControls> CreateScreenControls() override;
scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override;
scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler(
protocol::ClientStub* client_stub) override;
virtual scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
scoped_ptr<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor()
override;
};

class MockClientSessionControl : public ClientSessionControl {
public:
MockClientSessionControl();
virtual ~MockClientSessionControl();
~MockClientSessionControl() override;

MOCK_CONST_METHOD0(client_jid, const std::string&());
MOCK_METHOD0(DisconnectSession, void());
Expand All @@ -71,7 +71,7 @@ class MockClientSessionControl : public ClientSessionControl {
class MockClientSessionEventHandler : public ClientSession::EventHandler {
public:
MockClientSessionEventHandler();
virtual ~MockClientSessionEventHandler();
~MockClientSessionEventHandler() override;

MOCK_METHOD1(OnSessionAuthenticating, void(ClientSession* client));
MOCK_METHOD1(OnSessionAuthenticated, bool(ClientSession* client));
Expand All @@ -90,12 +90,12 @@ class MockClientSessionEventHandler : public ClientSession::EventHandler {
class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
public:
MockDesktopEnvironmentFactory();
virtual ~MockDesktopEnvironmentFactory();
~MockDesktopEnvironmentFactory() override;

MOCK_METHOD0(CreatePtr, DesktopEnvironment*());
MOCK_CONST_METHOD0(SupportsAudioCapture, bool());

virtual scoped_ptr<DesktopEnvironment> Create(
scoped_ptr<DesktopEnvironment> Create(
base::WeakPtr<ClientSessionControl> client_session_control) override;

private:
Expand All @@ -105,7 +105,7 @@ class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
class MockInputInjector : public InputInjector {
public:
MockInputInjector();
virtual ~MockInputInjector();
~MockInputInjector() override;

MOCK_METHOD1(InjectClipboardEvent,
void(const protocol::ClipboardEvent& event));
Expand All @@ -125,7 +125,7 @@ class MockInputInjector : public InputInjector {
class MockHostStatusObserver : public HostStatusObserver {
public:
MockHostStatusObserver();
virtual ~MockHostStatusObserver();
~MockHostStatusObserver() override;

MOCK_METHOD1(OnAccessDenied, void(const std::string& jid));
MOCK_METHOD1(OnClientAuthenticated, void(const std::string& jid));
Expand All @@ -142,7 +142,7 @@ class MockHostStatusObserver : public HostStatusObserver {
class MockGnubbyAuthHandler : public GnubbyAuthHandler {
public:
MockGnubbyAuthHandler();
virtual ~MockGnubbyAuthHandler();
~MockGnubbyAuthHandler() override;

MOCK_METHOD1(DeliverClientMessage, void(const std::string& message));
MOCK_CONST_METHOD2(DeliverHostDataMessage,
Expand All @@ -155,7 +155,7 @@ class MockGnubbyAuthHandler : public GnubbyAuthHandler {
class MockMouseCursorMonitor : public webrtc::MouseCursorMonitor {
public:
MockMouseCursorMonitor();
virtual ~MockMouseCursorMonitor();
~MockMouseCursorMonitor() override;

MOCK_METHOD2(Init, void(Callback* callback, Mode mode));
MOCK_METHOD0(Capture, void());
Expand Down
Loading

0 comments on commit 697f429

Please sign in to comment.