diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 05:30:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-21 12:30:36 +0000 |
commit | 562aba59981ae3d648503827d699ae8cbbeb6111 (patch) | |
tree | 6c87081fe54abeb19222388174122272a7f4f549 | |
parent | c24565478f64d1aa4d07e83c69d00bad11fa2665 (diff) | |
download | chromium_src-562aba59981ae3d648503827d699ae8cbbeb6111.zip chromium_src-562aba59981ae3d648503827d699ae8cbbeb6111.tar.gz chromium_src-562aba59981ae3d648503827d699ae8cbbeb6111.tar.bz2 |
Standardize usage of virtual/override/final in remoting/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=jamiewalch@chromium.org
Review URL: https://codereview.chromium.org/667123002
Cr-Commit-Position: refs/heads/master@{#300472}
190 files changed, 1140 insertions, 1268 deletions
diff --git a/remoting/base/auto_thread.h b/remoting/base/auto_thread.h index ece3685..9e6baef 100644 --- a/remoting/base/auto_thread.h +++ b/remoting/base/auto_thread.h @@ -55,7 +55,7 @@ class AutoThread : base::PlatformThread::Delegate { explicit AutoThread(const char* name); // Waits for the thread to exit, and then destroys it. - virtual ~AutoThread(); + ~AutoThread() override; // Starts the thread, running the specified type of MessageLoop. Returns // an AutoThreadTaskRunner through which tasks may be posted to the thread @@ -83,7 +83,7 @@ class AutoThread : base::PlatformThread::Delegate { void JoinAndDeleteThread(); // base::PlatformThread::Delegate methods: - virtual void ThreadMain() override; + void ThreadMain() override; // Used to pass data to ThreadMain. struct StartupData; diff --git a/remoting/base/auto_thread_task_runner.h b/remoting/base/auto_thread_task_runner.h index 7c40539..96a576d 100644 --- a/remoting/base/auto_thread_task_runner.h +++ b/remoting/base/auto_thread_task_runner.h @@ -25,18 +25,16 @@ class AutoThreadTaskRunner : public base::SingleThreadTaskRunner { const base::Closure& stop_task); // SingleThreadTaskRunner implementation - virtual bool PostDelayedTask( - const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) override; - virtual bool PostNonNestableDelayedTask( - const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) override; - virtual bool RunsTasksOnCurrentThread() const override; + bool PostDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override; + bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override; + bool RunsTasksOnCurrentThread() const override; private: - virtual ~AutoThreadTaskRunner(); + ~AutoThreadTaskRunner() override; // Task posted to |task_runner_| to notify the caller that it may be stopped. base::Closure stop_task_; diff --git a/remoting/base/compound_buffer.h b/remoting/base/compound_buffer.h index c919f88..50d3efb 100644 --- a/remoting/base/compound_buffer.h +++ b/remoting/base/compound_buffer.h @@ -103,15 +103,15 @@ class CompoundBufferInputStream public: // Caller keeps ownership of |buffer|. |buffer| must be locked. explicit CompoundBufferInputStream(const CompoundBuffer* buffer); - virtual ~CompoundBufferInputStream(); + ~CompoundBufferInputStream() override; int position() const { return position_; } // google::protobuf::io::ZeroCopyInputStream interface. - virtual bool Next(const void** data, int* size) override; - virtual void BackUp(int count) override; - virtual bool Skip(int count) override; - virtual int64 ByteCount() const override; + bool Next(const void** data, int* size) override; + void BackUp(int count) override; + bool Skip(int count) override; + int64 ByteCount() const override; private: const CompoundBuffer* buffer_; diff --git a/remoting/base/plugin_thread_task_runner.h b/remoting/base/plugin_thread_task_runner.h index 53830ce..3ae0025 100644 --- a/remoting/base/plugin_thread_task_runner.h +++ b/remoting/base/plugin_thread_task_runner.h @@ -46,18 +46,16 @@ class PluginThreadTaskRunner : public base::SingleThreadTaskRunner { void Quit(); // base::SingleThreadTaskRunner interface. - virtual bool PostDelayedTask( - const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) override; - virtual bool PostNonNestableDelayedTask( - const tracked_objects::Location& from_here, - const base::Closure& task, - base::TimeDelta delay) override; - virtual bool RunsTasksOnCurrentThread() const override; + bool PostDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override; + bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, + const base::Closure& task, + base::TimeDelta delay) override; + bool RunsTasksOnCurrentThread() const override; protected: - virtual ~PluginThreadTaskRunner(); + ~PluginThreadTaskRunner() override; private: // Methods that can be called from any thread. diff --git a/remoting/base/url_request_context_getter.h b/remoting/base/url_request_context_getter.h index d35b021..bba530f 100644 --- a/remoting/base/url_request_context_getter.h +++ b/remoting/base/url_request_context_getter.h @@ -26,12 +26,12 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { scoped_refptr<base::SingleThreadTaskRunner> file_task_runner); // Overridden from net::URLRequestContextGetter: - virtual net::URLRequestContext* GetURLRequestContext() override; - virtual scoped_refptr<base::SingleThreadTaskRunner> - GetNetworkTaskRunner() const override; + net::URLRequestContext* GetURLRequestContext() override; + scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() + const override; protected: - virtual ~URLRequestContextGetter(); + ~URLRequestContextGetter() override; private: scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; diff --git a/remoting/base/vlog_net_log.cc b/remoting/base/vlog_net_log.cc index 086fe33..e96ebb2 100644 --- a/remoting/base/vlog_net_log.cc +++ b/remoting/base/vlog_net_log.cc @@ -16,10 +16,10 @@ namespace remoting { class VlogNetLog::Observer : public net::NetLog::ThreadSafeObserver { public: Observer(); - virtual ~Observer(); + ~Observer() override; // NetLog::ThreadSafeObserver overrides: - virtual void OnAddEntry(const net::NetLog::Entry& entry) override; + void OnAddEntry(const net::NetLog::Entry& entry) override; private: DISALLOW_COPY_AND_ASSIGN(Observer); diff --git a/remoting/base/vlog_net_log.h b/remoting/base/vlog_net_log.h index 11b14a7..f1c4a2d 100644 --- a/remoting/base/vlog_net_log.h +++ b/remoting/base/vlog_net_log.h @@ -17,7 +17,7 @@ namespace remoting { class VlogNetLog : public net::NetLog { public: VlogNetLog(); - virtual ~VlogNetLog(); + ~VlogNetLog() override; private: class Observer; diff --git a/remoting/client/audio_decode_scheduler.h b/remoting/client/audio_decode_scheduler.h index 51d5d58..7848d67 100644 --- a/remoting/client/audio_decode_scheduler.h +++ b/remoting/client/audio_decode_scheduler.h @@ -29,14 +29,14 @@ class AudioDecodeScheduler : public protocol::AudioStub { scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, scoped_ptr<AudioPlayer> audio_player); - virtual ~AudioDecodeScheduler(); + ~AudioDecodeScheduler() override; // Initializes decoder with the information from the protocol config. void Initialize(const protocol::SessionConfig& config); // AudioStub implementation. - virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, - const base::Closure& done) override; + void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, + const base::Closure& done) override; private: class Core; diff --git a/remoting/client/audio_player_unittest.cc b/remoting/client/audio_player_unittest.cc index ed478d6f..733bf24 100644 --- a/remoting/client/audio_player_unittest.cc +++ b/remoting/client/audio_player_unittest.cc @@ -29,13 +29,9 @@ class FakeAudioPlayer : public AudioPlayer { FakeAudioPlayer() { } - virtual bool ResetAudioPlayer(AudioPacket::SamplingRate) override { - return true; - } + bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; } - virtual uint32 GetSamplesPerFrame() override { - return kAudioSamplesPerFrame; - } + uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; } }; class AudioPlayerTest : public ::testing::Test { diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h index a0088f5..9695084 100644 --- a/remoting/client/chromoting_client.h +++ b/remoting/client/chromoting_client.h @@ -47,7 +47,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, VideoRenderer* video_renderer, scoped_ptr<AudioPlayer> audio_player); - virtual ~ChromotingClient(); + ~ChromotingClient() override; void SetProtocolConfigForTests( scoped_ptr<protocol::CandidateSessionConfig> config); @@ -71,28 +71,23 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback, protocol::InputStub* input_stub() { return connection_.input_stub(); } // ClientStub implementation. - virtual void SetCapabilities( - const protocol::Capabilities& capabilities) override; - virtual void SetPairingResponse( + void SetCapabilities(const protocol::Capabilities& capabilities) override; + void SetPairingResponse( const protocol::PairingResponse& pairing_response) override; - virtual void DeliverHostMessage( - const protocol::ExtensionMessage& message) override; + void DeliverHostMessage(const protocol::ExtensionMessage& message) override; // ClipboardStub implementation for receiving clipboard data from host. - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; // CursorShapeStub implementation for receiving cursor shape updates. - virtual void SetCursorShape( - const protocol::CursorShapeInfo& cursor_shape) override; + void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; // ConnectionToHost::HostEventCallback implementation. - virtual void OnConnectionState( - protocol::ConnectionToHost::State state, - protocol::ErrorCode error) override; - virtual void OnConnectionReady(bool ready) override; - virtual void OnRouteChanged(const std::string& channel_name, - const protocol::TransportRoute& route) override; + void OnConnectionState(protocol::ConnectionToHost::State state, + protocol::ErrorCode error) override; + void OnConnectionReady(bool ready) override; + void OnRouteChanged(const std::string& channel_name, + const protocol::TransportRoute& route) override; private: // Called when the connection is authenticated. diff --git a/remoting/client/frame_consumer_proxy.h b/remoting/client/frame_consumer_proxy.h index 3b273bb..15b1012 100644 --- a/remoting/client/frame_consumer_proxy.h +++ b/remoting/client/frame_consumer_proxy.h @@ -30,19 +30,19 @@ class FrameConsumerProxy const base::WeakPtr<FrameConsumer>& frame_consumer); // FrameConsumer implementation. - virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, - webrtc::DesktopFrame* buffer, - const webrtc::DesktopRegion& region, - const webrtc::DesktopRegion& shape) override; - virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) override; - virtual void SetSourceSize(const webrtc::DesktopSize& source_size, - const webrtc::DesktopVector& dpi) override; - virtual PixelFormat GetPixelFormat() override; + void ApplyBuffer(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area, + webrtc::DesktopFrame* buffer, + const webrtc::DesktopRegion& region, + const webrtc::DesktopRegion& shape) override; + void ReturnBuffer(webrtc::DesktopFrame* buffer) override; + void SetSourceSize(const webrtc::DesktopSize& source_size, + const webrtc::DesktopVector& dpi) override; + PixelFormat GetPixelFormat() override; private: friend class base::RefCountedThreadSafe<FrameConsumerProxy>; - virtual ~FrameConsumerProxy(); + ~FrameConsumerProxy() override; base::WeakPtr<FrameConsumer> frame_consumer_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; diff --git a/remoting/client/key_event_mapper.h b/remoting/client/key_event_mapper.h index 51f3afc..b81c657 100644 --- a/remoting/client/key_event_mapper.h +++ b/remoting/client/key_event_mapper.h @@ -22,7 +22,7 @@ class KeyEventMapper : public protocol::InputFilter { public: KeyEventMapper(); explicit KeyEventMapper(InputStub* input_stub); - virtual ~KeyEventMapper(); + ~KeyEventMapper() override; // Callback type for use with SetTrapCallback(), below. typedef base::Callback<void(const protocol::KeyEvent&)> KeyTrapCallback; @@ -39,7 +39,7 @@ class KeyEventMapper : public protocol::InputFilter { void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode); // InputFilter overrides. - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; private: std::map<uint32,uint32> mapped_keys; diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h index bd4e7c4..d630bf9 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -104,37 +104,33 @@ class ChromotingInstance : static const int kApiMinScriptableVersion = 5; explicit ChromotingInstance(PP_Instance instance); - virtual ~ChromotingInstance(); + ~ChromotingInstance() override; // pp::Instance interface. - virtual void DidChangeFocus(bool has_focus) override; - virtual void DidChangeView(const pp::View& view) override; - virtual bool Init(uint32_t argc, const char* argn[], - const char* argv[]) override; - virtual void HandleMessage(const pp::Var& message) override; - virtual bool HandleInputEvent(const pp::InputEvent& event) override; + void DidChangeFocus(bool has_focus) override; + void DidChangeView(const pp::View& view) override; + bool Init(uint32_t argc, const char* argn[], const char* argv[]) override; + void HandleMessage(const pp::Var& message) override; + bool HandleInputEvent(const pp::InputEvent& event) override; // ClientUserInterface interface. - virtual void OnConnectionState(protocol::ConnectionToHost::State state, - protocol::ErrorCode error) override; - virtual void OnConnectionReady(bool ready) override; - virtual void OnRouteChanged(const std::string& channel_name, - const protocol::TransportRoute& route) override; - virtual void SetCapabilities(const std::string& capabilities) override; - virtual void SetPairingResponse( + void OnConnectionState(protocol::ConnectionToHost::State state, + protocol::ErrorCode error) override; + void OnConnectionReady(bool ready) override; + void OnRouteChanged(const std::string& channel_name, + const protocol::TransportRoute& route) override; + void SetCapabilities(const std::string& capabilities) override; + void SetPairingResponse( const protocol::PairingResponse& pairing_response) override; - virtual void DeliverHostMessage( - const protocol::ExtensionMessage& message) override; - virtual protocol::ClipboardStub* GetClipboardStub() override; - virtual protocol::CursorShapeStub* GetCursorShapeStub() override; + void DeliverHostMessage(const protocol::ExtensionMessage& message) override; + protocol::ClipboardStub* GetClipboardStub() override; + protocol::CursorShapeStub* GetCursorShapeStub() override; // protocol::ClipboardStub interface. - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; // protocol::CursorShapeStub interface. - virtual void SetCursorShape( - const protocol::CursorShapeInfo& cursor_shape) override; + void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override; // Called by PepperView. void SetDesktopSize(const webrtc::DesktopSize& size, @@ -244,12 +240,13 @@ class ChromotingInstance : const protocol::SecretFetchedCallback& secret_fetched_callback); // MediaSourceVideoRenderer::Delegate implementation. - virtual void OnMediaSourceSize(const webrtc::DesktopSize& size, - const webrtc::DesktopVector& dpi) override; - virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) override; - virtual void OnMediaSourceReset(const std::string& format) override; - virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size, - bool keyframe) override; + void OnMediaSourceSize(const webrtc::DesktopSize& size, + const webrtc::DesktopVector& dpi) override; + void OnMediaSourceShape(const webrtc::DesktopRegion& shape) override; + void OnMediaSourceReset(const std::string& format) override; + void OnMediaSourceData(uint8_t* buffer, + size_t buffer_size, + bool keyframe) override; bool initialized_; diff --git a/remoting/client/plugin/delegating_signal_strategy.h b/remoting/client/plugin/delegating_signal_strategy.h index e78a47c..12fb595 100644 --- a/remoting/client/plugin/delegating_signal_strategy.h +++ b/remoting/client/plugin/delegating_signal_strategy.h @@ -21,20 +21,20 @@ class DelegatingSignalStrategy : public SignalStrategy { DelegatingSignalStrategy(std::string local_jid, const SendIqCallback& send_iq_callback); - virtual ~DelegatingSignalStrategy(); + ~DelegatingSignalStrategy() override; void OnIncomingMessage(const std::string& message); // SignalStrategy interface. - virtual void Connect() override; - virtual void Disconnect() override; - virtual State GetState() const override; - virtual Error GetError() const override; - virtual std::string GetLocalJid() const override; - virtual void AddListener(Listener* listener) override; - virtual void RemoveListener(Listener* listener) override; - virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; - virtual std::string GetNextId() override; + void Connect() override; + void Disconnect() override; + State GetState() const override; + Error GetError() const override; + std::string GetLocalJid() const override; + void AddListener(Listener* listener) override; + void RemoveListener(Listener* listener) override; + bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; + std::string GetNextId() override; private: std::string local_jid_; diff --git a/remoting/client/plugin/media_source_video_renderer.cc b/remoting/client/plugin/media_source_video_renderer.cc index e6d21b8..812d700 100644 --- a/remoting/client/plugin/media_source_video_renderer.cc +++ b/remoting/client/plugin/media_source_video_renderer.cc @@ -22,18 +22,18 @@ class MediaSourceVideoRenderer::VideoWriter : public mkvmuxer::IMkvWriter { typedef std::vector<uint8_t> DataBuffer; VideoWriter(const webrtc::DesktopSize& frame_size, const char* codec_id); - virtual ~VideoWriter(); + ~VideoWriter() override; const webrtc::DesktopSize& size() { return frame_size_; } int64_t last_frame_timestamp() { return timecode_ - kFrameIntervalNs; } // IMkvWriter interface. - virtual mkvmuxer::int32 Write(const void* buf, mkvmuxer::uint32 len) override; - virtual mkvmuxer::int64 Position() const override; - virtual mkvmuxer::int32 Position(mkvmuxer::int64 position) override; - virtual bool Seekable() const override; - virtual void ElementStartNotify(mkvmuxer::uint64 element_id, - mkvmuxer::int64 position) override; + mkvmuxer::int32 Write(const void* buf, mkvmuxer::uint32 len) override; + mkvmuxer::int64 Position() const override; + mkvmuxer::int32 Position(mkvmuxer::int64 position) override; + bool Seekable() const override; + void ElementStartNotify(mkvmuxer::uint64 element_id, + mkvmuxer::int64 position) override; scoped_ptr<DataBuffer> OnVideoFrame(const std::string& video_data, bool keyframe); diff --git a/remoting/client/plugin/media_source_video_renderer.h b/remoting/client/plugin/media_source_video_renderer.h index c8c260bb..9497072 100644 --- a/remoting/client/plugin/media_source_video_renderer.h +++ b/remoting/client/plugin/media_source_video_renderer.h @@ -43,13 +43,13 @@ class MediaSourceVideoRenderer : public VideoRenderer { }; explicit MediaSourceVideoRenderer(Delegate* delegate); - virtual ~MediaSourceVideoRenderer(); + ~MediaSourceVideoRenderer() override; // VideoRenderer interface. - virtual void Initialize(const protocol::SessionConfig& config) override; - virtual ChromotingStats* GetStats() override; - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, - const base::Closure& done) override; + void Initialize(const protocol::SessionConfig& config) override; + ChromotingStats* GetStats() override; + void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, + const base::Closure& done) override; private: // Helper class used to generate WebM stream. diff --git a/remoting/client/plugin/normalizing_input_filter_cros.h b/remoting/client/plugin/normalizing_input_filter_cros.h index 73c919a..9158d89 100644 --- a/remoting/client/plugin/normalizing_input_filter_cros.h +++ b/remoting/client/plugin/normalizing_input_filter_cros.h @@ -23,11 +23,11 @@ namespace remoting { class NormalizingInputFilterCros : public protocol::InputFilter { public: explicit NormalizingInputFilterCros(protocol::InputStub* input_stub); - virtual ~NormalizingInputFilterCros(); + ~NormalizingInputFilterCros() override; // InputFilter overrides. - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; - virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; private: void ProcessKeyDown(const protocol::KeyEvent& event); diff --git a/remoting/client/plugin/normalizing_input_filter_mac.h b/remoting/client/plugin/normalizing_input_filter_mac.h index 5e33911..a262cda 100644 --- a/remoting/client/plugin/normalizing_input_filter_mac.h +++ b/remoting/client/plugin/normalizing_input_filter_mac.h @@ -45,10 +45,10 @@ namespace remoting { class NormalizingInputFilterMac : public protocol::InputFilter { public: explicit NormalizingInputFilterMac(protocol::InputStub* input_stub); - virtual ~NormalizingInputFilterMac(); + ~NormalizingInputFilterMac() override; // InputFilter overrides. - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; private: typedef std::map<int, protocol::KeyEvent> KeyPressedMap; diff --git a/remoting/client/plugin/pepper_address_resolver.h b/remoting/client/plugin/pepper_address_resolver.h index 42e61b6..68e7b73 100644 --- a/remoting/client/plugin/pepper_address_resolver.h +++ b/remoting/client/plugin/pepper_address_resolver.h @@ -16,14 +16,13 @@ namespace remoting { class PepperAddressResolver : public rtc::AsyncResolverInterface { public: explicit PepperAddressResolver(const pp::InstanceHandle& instance); - virtual ~PepperAddressResolver(); + ~PepperAddressResolver() override; // rtc::AsyncResolverInterface. - virtual void Start(const rtc::SocketAddress& addr) override; - virtual bool GetResolvedAddress(int family, - rtc::SocketAddress* addr) const override; - virtual int GetError() const override; - virtual void Destroy(bool wait) override; + void Start(const rtc::SocketAddress& addr) override; + bool GetResolvedAddress(int family, rtc::SocketAddress* addr) const override; + int GetError() const override; + void Destroy(bool wait) override; private: void OnResolved(int32_t result); diff --git a/remoting/client/plugin/pepper_audio_player.h b/remoting/client/plugin/pepper_audio_player.h index f86075b..dcf2c6b 100644 --- a/remoting/client/plugin/pepper_audio_player.h +++ b/remoting/client/plugin/pepper_audio_player.h @@ -16,12 +16,11 @@ namespace remoting { class PepperAudioPlayer : public AudioPlayer { public: explicit PepperAudioPlayer(pp::Instance* instance); - virtual ~PepperAudioPlayer(); + ~PepperAudioPlayer() override; - virtual uint32 GetSamplesPerFrame() override; + uint32 GetSamplesPerFrame() override; - virtual bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) - override; + bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override; private: pp::Instance* instance_; diff --git a/remoting/client/plugin/pepper_entrypoints.cc b/remoting/client/plugin/pepper_entrypoints.cc index b40f90e..e337ed2 100644 --- a/remoting/client/plugin/pepper_entrypoints.cc +++ b/remoting/client/plugin/pepper_entrypoints.cc @@ -18,7 +18,7 @@ namespace remoting { class ChromotingModule : public pp::Module { protected: - virtual ChromotingInstance* CreateInstance(PP_Instance instance) override { + ChromotingInstance* CreateInstance(PP_Instance instance) override { return new ChromotingInstance(instance); } }; diff --git a/remoting/client/plugin/pepper_input_handler.h b/remoting/client/plugin/pepper_input_handler.h index cacfd9d..48d85c2 100644 --- a/remoting/client/plugin/pepper_input_handler.h +++ b/remoting/client/plugin/pepper_input_handler.h @@ -28,7 +28,7 @@ class PepperInputHandler : public pp::MouseLock { public: // |instance| must outlive |this|. explicit PepperInputHandler(pp::Instance* instance); - virtual ~PepperInputHandler(); + ~PepperInputHandler() override; void set_input_stub(protocol::InputStub* input_stub) { input_stub_ = input_stub; @@ -64,7 +64,7 @@ class PepperInputHandler : public pp::MouseLock { }; // pp::MouseLock interface. - virtual void MouseLockLost() override; + void MouseLockLost() override; // Requests the browser to lock the mouse and hides the cursor. void RequestMouseLock(); diff --git a/remoting/client/plugin/pepper_network_manager.h b/remoting/client/plugin/pepper_network_manager.h index 4525522..c761d3a 100644 --- a/remoting/client/plugin/pepper_network_manager.h +++ b/remoting/client/plugin/pepper_network_manager.h @@ -24,11 +24,11 @@ namespace remoting { class PepperNetworkManager : public rtc::NetworkManagerBase { public: PepperNetworkManager(const pp::InstanceHandle& instance); - virtual ~PepperNetworkManager(); + ~PepperNetworkManager() override; // NetworkManager interface. - virtual void StartUpdating() override; - virtual void StopUpdating() override; + void StartUpdating() override; + void StopUpdating() override; private: static void OnNetworkListCallbackHandler(void* user_data, diff --git a/remoting/client/plugin/pepper_packet_socket_factory.cc b/remoting/client/plugin/pepper_packet_socket_factory.cc index 713973e..2960a7f 100644 --- a/remoting/client/plugin/pepper_packet_socket_factory.cc +++ b/remoting/client/plugin/pepper_packet_socket_factory.cc @@ -86,7 +86,7 @@ int PepperErrorToNetError(int error) { class UdpPacketSocket : public rtc::AsyncPacketSocket { public: explicit UdpPacketSocket(const pp::InstanceHandle& instance); - virtual ~UdpPacketSocket(); + ~UdpPacketSocket() override; // |min_port| and |max_port| are set to zero if the port number // should be assigned by the OS. @@ -95,20 +95,21 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket { int max_port); // rtc::AsyncPacketSocket interface. - virtual rtc::SocketAddress GetLocalAddress() const override; - virtual rtc::SocketAddress GetRemoteAddress() const override; - virtual int Send(const void* data, size_t data_size, - const rtc::PacketOptions& options) override; - virtual int SendTo(const void* data, - size_t data_size, - const rtc::SocketAddress& address, - const rtc::PacketOptions& options) override; - virtual int Close() override; - virtual State GetState() const override; - virtual int GetOption(rtc::Socket::Option opt, int* value) override; - virtual int SetOption(rtc::Socket::Option opt, int value) override; - virtual int GetError() const override; - virtual void SetError(int error) override; + rtc::SocketAddress GetLocalAddress() const override; + rtc::SocketAddress GetRemoteAddress() const override; + int Send(const void* data, + size_t data_size, + const rtc::PacketOptions& options) override; + int SendTo(const void* data, + size_t data_size, + const rtc::SocketAddress& address, + const rtc::PacketOptions& options) override; + int Close() override; + State GetState() const override; + int GetOption(rtc::Socket::Option opt, int* value) override; + int SetOption(rtc::Socket::Option opt, int value) override; + int GetError() const override; + void SetError(int error) override; private: struct PendingPacket { diff --git a/remoting/client/plugin/pepper_packet_socket_factory.h b/remoting/client/plugin/pepper_packet_socket_factory.h index 1cd15e7..6fcf0a4 100644 --- a/remoting/client/plugin/pepper_packet_socket_factory.h +++ b/remoting/client/plugin/pepper_packet_socket_factory.h @@ -14,23 +14,24 @@ namespace remoting { class PepperPacketSocketFactory : public rtc::PacketSocketFactory { public: explicit PepperPacketSocketFactory(const pp::InstanceHandle& instance); - virtual ~PepperPacketSocketFactory(); + ~PepperPacketSocketFactory() override; - virtual rtc::AsyncPacketSocket* CreateUdpSocket( + rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - int min_port, int max_port) override; - virtual rtc::AsyncPacketSocket* CreateServerTcpSocket( + int min_port, + int max_port) override; + rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, int min_port, int max_port, int opts) override; - virtual rtc::AsyncPacketSocket* CreateClientTcpSocket( + rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, const rtc::SocketAddress& remote_address, const rtc::ProxyInfo& proxy_info, const std::string& user_agent, int opts) override; - virtual rtc::AsyncResolverInterface* CreateAsyncResolver() override; + rtc::AsyncResolverInterface* CreateAsyncResolver() override; private: const pp::InstanceHandle pp_instance_; diff --git a/remoting/client/plugin/pepper_plugin_thread_delegate.h b/remoting/client/plugin/pepper_plugin_thread_delegate.h index aa3ce33..eb6ddb3 100644 --- a/remoting/client/plugin/pepper_plugin_thread_delegate.h +++ b/remoting/client/plugin/pepper_plugin_thread_delegate.h @@ -16,10 +16,11 @@ namespace remoting { class PepperPluginThreadDelegate : public PluginThreadTaskRunner::Delegate { public: PepperPluginThreadDelegate(); - virtual ~PepperPluginThreadDelegate(); + ~PepperPluginThreadDelegate() override; - virtual bool RunOnPluginThread( - base::TimeDelta delay, void(CDECL function)(void*), void* data) override; + bool RunOnPluginThread(base::TimeDelta delay, + void(CDECL function)(void*), + void* data) override; private: pp::Core* core_; diff --git a/remoting/client/plugin/pepper_port_allocator.cc b/remoting/client/plugin/pepper_port_allocator.cc index e03d050..a601480 100644 --- a/remoting/client/plugin/pepper_port_allocator.cc +++ b/remoting/client/plugin/pepper_port_allocator.cc @@ -37,12 +37,12 @@ class PepperPortAllocatorSession const std::vector<std::string>& relay_hosts, const std::string& relay_token, const pp::InstanceHandle& instance); - virtual ~PepperPortAllocatorSession(); + ~PepperPortAllocatorSession() override; // cricket::HttpPortAllocatorBase overrides. - virtual void ConfigReady(cricket::PortConfiguration* config) override; - virtual void GetPortConfigurations() override; - virtual void SendSessionRequest(const std::string& host, int port) override; + void ConfigReady(cricket::PortConfiguration* config) override; + void GetPortConfigurations() override; + void SendSessionRequest(const std::string& host, int port) override; private: void OnUrlOpened(int32_t result); diff --git a/remoting/client/plugin/pepper_port_allocator.h b/remoting/client/plugin/pepper_port_allocator.h index 37887a7..c6c3de7 100644 --- a/remoting/client/plugin/pepper_port_allocator.h +++ b/remoting/client/plugin/pepper_port_allocator.h @@ -25,10 +25,10 @@ class PepperPortAllocator : public cricket::HttpPortAllocatorBase { public: static scoped_ptr<PepperPortAllocator> Create( const pp::InstanceHandle& instance); - virtual ~PepperPortAllocator(); + ~PepperPortAllocator() override; // cricket::HttpPortAllocatorBase overrides. - virtual cricket::PortAllocatorSession* CreateSessionInternal( + cricket::PortAllocatorSession* CreateSessionInternal( const std::string& content_name, int component, const std::string& ice_username_fragment, diff --git a/remoting/client/plugin/pepper_view.h b/remoting/client/plugin/pepper_view.h index 37f3a89..388bd9a 100644 --- a/remoting/client/plugin/pepper_view.h +++ b/remoting/client/plugin/pepper_view.h @@ -38,22 +38,22 @@ class PepperView : public FrameConsumer { // Constructs a PepperView for the |instance|. The |instance| and |context| // must outlive this class. PepperView(ChromotingInstance* instance, ClientContext* context); - virtual ~PepperView(); + ~PepperView() override; // Allocates buffers and passes them to the FrameProducer to render into until // the maximum number of buffers are in-flight. void Initialize(FrameProducer* producer); // FrameConsumer implementation. - virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, - webrtc::DesktopFrame* buffer, - const webrtc::DesktopRegion& region, - const webrtc::DesktopRegion& shape) override; - virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) override; - virtual void SetSourceSize(const webrtc::DesktopSize& source_size, - const webrtc::DesktopVector& dpi) override; - virtual PixelFormat GetPixelFormat() override; + void ApplyBuffer(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area, + webrtc::DesktopFrame* buffer, + const webrtc::DesktopRegion& region, + const webrtc::DesktopRegion& shape) override; + void ReturnBuffer(webrtc::DesktopFrame* buffer) override; + void SetSourceSize(const webrtc::DesktopSize& source_size, + const webrtc::DesktopVector& dpi) override; + PixelFormat GetPixelFormat() override; // Updates the PepperView's size & clipping area, taking into account the // DIP-to-device scale factor. diff --git a/remoting/client/software_video_renderer.cc b/remoting/client/software_video_renderer.cc index 23049fc..96758b3 100644 --- a/remoting/client/software_video_renderer.cc +++ b/remoting/client/software_video_renderer.cc @@ -37,24 +37,24 @@ class RgbToBgrVideoDecoderFilter : public VideoDecoder { : parent_(parent.Pass()) { } - virtual void Initialize(const webrtc::DesktopSize& screen_size) override { + void Initialize(const webrtc::DesktopSize& screen_size) override { parent_->Initialize(screen_size); } - virtual bool DecodePacket(const VideoPacket& packet) override { + bool DecodePacket(const VideoPacket& packet) override { return parent_->DecodePacket(packet); } - virtual void Invalidate(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRegion& region) override { + void Invalidate(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRegion& region) override { return parent_->Invalidate(view_size, region); } - virtual void RenderFrame(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, - uint8* image_buffer, - int image_stride, - webrtc::DesktopRegion* output_region) override { + void RenderFrame(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area, + uint8* image_buffer, + int image_stride, + webrtc::DesktopRegion* output_region) override { parent_->RenderFrame(view_size, clip_area, image_buffer, image_stride, output_region); @@ -68,7 +68,7 @@ class RgbToBgrVideoDecoderFilter : public VideoDecoder { } } - virtual const webrtc::DesktopRegion* GetImageShape() override { + const webrtc::DesktopRegion* GetImageShape() override { return parent_->GetImageShape(); } diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h index ee05d11..f698e4b 100644 --- a/remoting/client/software_video_renderer.h +++ b/remoting/client/software_video_renderer.h @@ -39,13 +39,13 @@ class SoftwareVideoRenderer : public VideoRenderer, scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> decode_task_runner, scoped_refptr<FrameConsumerProxy> consumer); - virtual ~SoftwareVideoRenderer(); + ~SoftwareVideoRenderer() override; // VideoRenderer implementation. - virtual void Initialize(const protocol::SessionConfig& config) override; - virtual ChromotingStats* GetStats() override; - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, - const base::Closure& done) override; + void Initialize(const protocol::SessionConfig& config) override; + ChromotingStats* GetStats() override; + void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, + const base::Closure& done) override; // FrameProducer implementation. These methods may be called before we are // Initialize()d, or we know the source screen size. These methods may be @@ -54,12 +54,11 @@ class SoftwareVideoRenderer : public VideoRenderer, // TODO(sergeyu): On Android a separate display thread is used for drawing. // FrameConsumer calls FrameProducer on that thread. Can we avoid having a // separate display thread? E.g. can we do everything on the decode thread? - virtual void DrawBuffer(webrtc::DesktopFrame* buffer) override; - virtual void InvalidateRegion(const webrtc::DesktopRegion& region) override; - virtual void RequestReturnBuffers(const base::Closure& done) override; - virtual void SetOutputSizeAndClip( - const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area) override; + void DrawBuffer(webrtc::DesktopFrame* buffer) override; + void InvalidateRegion(const webrtc::DesktopRegion& region) override; + void RequestReturnBuffers(const base::Closure& done) override; + void SetOutputSizeAndClip(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area) override; private: class Core; diff --git a/remoting/client/token_fetcher_proxy.h b/remoting/client/token_fetcher_proxy.h index 708bf81..e71aa04 100644 --- a/remoting/client/token_fetcher_proxy.h +++ b/remoting/client/token_fetcher_proxy.h @@ -22,10 +22,10 @@ class TokenFetcherProxy TokenFetcherProxy(const TokenFetcherCallback& token_fetcher_impl, const std::string& host_public_key); - virtual ~TokenFetcherProxy(); + ~TokenFetcherProxy() override; // protocol::TokenClientAuthenticator::TokenFetcher interface. - virtual void FetchThirdPartyToken( + void FetchThirdPartyToken( const GURL& token_url, const std::string& scope, const TokenFetchedCallback& token_fetched_callback) override; diff --git a/remoting/codec/audio_decoder_opus.h b/remoting/codec/audio_decoder_opus.h index 2c3a527..dcf8776 100644 --- a/remoting/codec/audio_decoder_opus.h +++ b/remoting/codec/audio_decoder_opus.h @@ -18,11 +18,10 @@ class AudioPacket; class AudioDecoderOpus : public AudioDecoder { public: AudioDecoderOpus(); - virtual ~AudioDecoderOpus(); + ~AudioDecoderOpus() override; // AudioDecoder interface. - virtual scoped_ptr<AudioPacket> Decode( - scoped_ptr<AudioPacket> packet) override; + scoped_ptr<AudioPacket> Decode(scoped_ptr<AudioPacket> packet) override; private: void InitDecoder(); diff --git a/remoting/codec/audio_decoder_verbatim.h b/remoting/codec/audio_decoder_verbatim.h index aef5cd9..e6d1172 100644 --- a/remoting/codec/audio_decoder_verbatim.h +++ b/remoting/codec/audio_decoder_verbatim.h @@ -17,10 +17,9 @@ class AudioPacket; class AudioDecoderVerbatim : public AudioDecoder { public: AudioDecoderVerbatim(); - virtual ~AudioDecoderVerbatim(); + ~AudioDecoderVerbatim() override; - virtual scoped_ptr<AudioPacket> Decode( - scoped_ptr<AudioPacket> packet) override; + scoped_ptr<AudioPacket> Decode(scoped_ptr<AudioPacket> packet) override; private: DISALLOW_COPY_AND_ASSIGN(AudioDecoderVerbatim); diff --git a/remoting/codec/audio_encoder_opus.h b/remoting/codec/audio_encoder_opus.h index 16be750..7f86785 100644 --- a/remoting/codec/audio_encoder_opus.h +++ b/remoting/codec/audio_encoder_opus.h @@ -23,11 +23,10 @@ class AudioPacket; class AudioEncoderOpus : public AudioEncoder { public: AudioEncoderOpus(); - virtual ~AudioEncoderOpus(); + ~AudioEncoderOpus() override; // AudioEncoder interface. - virtual scoped_ptr<AudioPacket> Encode( - scoped_ptr<AudioPacket> packet) override; + scoped_ptr<AudioPacket> Encode(scoped_ptr<AudioPacket> packet) override; private: void InitEncoder(); diff --git a/remoting/codec/audio_encoder_verbatim.h b/remoting/codec/audio_encoder_verbatim.h index 25cd54e..2605b6e 100644 --- a/remoting/codec/audio_encoder_verbatim.h +++ b/remoting/codec/audio_encoder_verbatim.h @@ -14,11 +14,10 @@ class AudioPacket; class AudioEncoderVerbatim : public AudioEncoder { public: AudioEncoderVerbatim(); - virtual ~AudioEncoderVerbatim(); + ~AudioEncoderVerbatim() override; // AudioEncoder implementation. - virtual scoped_ptr<AudioPacket> Encode( - scoped_ptr<AudioPacket> packet) override; + scoped_ptr<AudioPacket> Encode(scoped_ptr<AudioPacket> packet) override; private: DISALLOW_COPY_AND_ASSIGN(AudioEncoderVerbatim); diff --git a/remoting/codec/video_decoder_verbatim.h b/remoting/codec/video_decoder_verbatim.h index a02b2708..6a9ba40 100644 --- a/remoting/codec/video_decoder_verbatim.h +++ b/remoting/codec/video_decoder_verbatim.h @@ -18,21 +18,21 @@ namespace remoting { // video frames. class VideoDecoderVerbatim : public VideoDecoder { public: - virtual ~VideoDecoderVerbatim(); + ~VideoDecoderVerbatim() override; VideoDecoderVerbatim(); // VideoDecoder implementation. - virtual void Initialize(const webrtc::DesktopSize& screen_size) override; - virtual bool DecodePacket(const VideoPacket& packet) override; - virtual void Invalidate(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRegion& region) override; - virtual void RenderFrame(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, - uint8* image_buffer, - int image_stride, - webrtc::DesktopRegion* output_region) override; - virtual const webrtc::DesktopRegion* GetImageShape() override; + void Initialize(const webrtc::DesktopSize& screen_size) override; + bool DecodePacket(const VideoPacket& packet) override; + void Invalidate(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRegion& region) override; + void RenderFrame(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area, + uint8* image_buffer, + int image_stride, + webrtc::DesktopRegion* output_region) override; + const webrtc::DesktopRegion* GetImageShape() override; private: // The region updated that hasn't been copied to the screen yet. diff --git a/remoting/codec/video_decoder_vpx.h b/remoting/codec/video_decoder_vpx.h index bbf731c..9c96998 100644 --- a/remoting/codec/video_decoder_vpx.h +++ b/remoting/codec/video_decoder_vpx.h @@ -22,19 +22,19 @@ class VideoDecoderVpx : public VideoDecoder { static scoped_ptr<VideoDecoderVpx> CreateForVP8(); static scoped_ptr<VideoDecoderVpx> CreateForVP9(); - virtual ~VideoDecoderVpx(); + ~VideoDecoderVpx() override; // VideoDecoder interface. - virtual void Initialize(const webrtc::DesktopSize& screen_size) override; - virtual bool DecodePacket(const VideoPacket& packet) override; - virtual void Invalidate(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRegion& region) override; - virtual void RenderFrame(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, - uint8* image_buffer, - int image_stride, - webrtc::DesktopRegion* output_region) override; - virtual const webrtc::DesktopRegion* GetImageShape() override; + void Initialize(const webrtc::DesktopSize& screen_size) override; + bool DecodePacket(const VideoPacket& packet) override; + void Invalidate(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRegion& region) override; + void RenderFrame(const webrtc::DesktopSize& view_size, + const webrtc::DesktopRect& clip_area, + uint8* image_buffer, + int image_stride, + webrtc::DesktopRegion* output_region) override; + const webrtc::DesktopRegion* GetImageShape() override; private: explicit VideoDecoderVpx(ScopedVpxCodec codec); diff --git a/remoting/codec/video_encoder_verbatim.h b/remoting/codec/video_encoder_verbatim.h index e315c24..1a348be 100644 --- a/remoting/codec/video_encoder_verbatim.h +++ b/remoting/codec/video_encoder_verbatim.h @@ -15,11 +15,10 @@ namespace remoting { class VideoEncoderVerbatim : public VideoEncoder { public: VideoEncoderVerbatim(); - virtual ~VideoEncoderVerbatim(); + ~VideoEncoderVerbatim() override; // VideoEncoder interface. - virtual scoped_ptr<VideoPacket> Encode( - const webrtc::DesktopFrame& frame) override; + scoped_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame) override; private: VideoEncoderHelper helper_; diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h index db3ff98..fe5bd33 100644 --- a/remoting/codec/video_encoder_vpx.h +++ b/remoting/codec/video_encoder_vpx.h @@ -26,13 +26,12 @@ class VideoEncoderVpx : public VideoEncoder { static scoped_ptr<VideoEncoderVpx> CreateForVP8(); static scoped_ptr<VideoEncoderVpx> CreateForVP9(); - virtual ~VideoEncoderVpx(); + ~VideoEncoderVpx() override; // VideoEncoder interface. - virtual void SetLosslessEncode(bool want_lossless) override; - virtual void SetLosslessColor(bool want_lossless) override; - virtual scoped_ptr<VideoPacket> Encode( - const webrtc::DesktopFrame& frame) override; + void SetLosslessEncode(bool want_lossless) override; + void SetLosslessColor(bool want_lossless) override; + scoped_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame) override; private: explicit VideoEncoderVpx(bool use_vp9); diff --git a/remoting/host/basic_desktop_environment.h b/remoting/host/basic_desktop_environment.h index a5416b2..6b6b8e2 100644 --- a/remoting/host/basic_desktop_environment.h +++ b/remoting/host/basic_desktop_environment.h @@ -27,18 +27,17 @@ class GnubbyAuthHandler; // the local console. class BasicDesktopEnvironment : public DesktopEnvironment { public: - virtual ~BasicDesktopEnvironment(); + ~BasicDesktopEnvironment() override; // 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() - override; - virtual std::string GetCapabilities() const override; - virtual void SetCapabilities(const std::string& capabilities) 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override; + std::string GetCapabilities() const override; + void SetCapabilities(const std::string& capabilities) override; + scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( protocol::ClientStub* client_stub) override; protected: @@ -93,10 +92,10 @@ class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory { scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); - virtual ~BasicDesktopEnvironmentFactory(); + ~BasicDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory implementation. - virtual bool SupportsAudioCapture() const override; + bool SupportsAudioCapture() const override; protected: scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const { diff --git a/remoting/host/cast_extension.h b/remoting/host/cast_extension.h index b26641f..b7a2db6 100644 --- a/remoting/host/cast_extension.h +++ b/remoting/host/cast_extension.h @@ -32,11 +32,11 @@ class CastExtension : public HostExtension { scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, const protocol::NetworkSettings& network_settings); - virtual ~CastExtension(); + ~CastExtension() override; // HostExtension interface. - virtual std::string capability() const override; - virtual scoped_ptr<HostExtensionSession> CreateExtensionSession( + std::string capability() const override; + scoped_ptr<HostExtensionSession> CreateExtensionSession( ClientSessionControl* client_session_control, protocol::ClientStub* client_stub) override; diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc index 1976cda..9cc03b6 100644 --- a/remoting/host/cast_extension_session.cc +++ b/remoting/host/cast_extension_session.cc @@ -71,16 +71,16 @@ class CastSetSessionDescriptionObserver static CastSetSessionDescriptionObserver* Create() { return new rtc::RefCountedObject<CastSetSessionDescriptionObserver>(); } - virtual void OnSuccess() override { + void OnSuccess() override { VLOG(1) << "Setting session description succeeded."; } - virtual void OnFailure(const std::string& error) override { + void OnFailure(const std::string& error) override { LOG(ERROR) << "Setting session description failed: " << error; } protected: CastSetSessionDescriptionObserver() {} - virtual ~CastSetSessionDescriptionObserver() {} + ~CastSetSessionDescriptionObserver() override {} DISALLOW_COPY_AND_ASSIGN(CastSetSessionDescriptionObserver); }; @@ -95,7 +95,7 @@ class CastCreateSessionDescriptionObserver return new rtc::RefCountedObject<CastCreateSessionDescriptionObserver>( session); } - virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) override { + void OnSuccess(webrtc::SessionDescriptionInterface* desc) override { if (cast_extension_session_ == NULL) { LOG(ERROR) << "No CastExtensionSession. Creating session description succeeded."; @@ -103,7 +103,7 @@ class CastCreateSessionDescriptionObserver } cast_extension_session_->OnCreateSessionDescription(desc); } - virtual void OnFailure(const std::string& error) override { + void OnFailure(const std::string& error) override { if (cast_extension_session_ == NULL) { LOG(ERROR) << "No CastExtensionSession. Creating session description failed."; @@ -118,7 +118,7 @@ class CastCreateSessionDescriptionObserver protected: explicit CastCreateSessionDescriptionObserver(CastExtensionSession* session) : cast_extension_session_(session) {} - virtual ~CastCreateSessionDescriptionObserver() {} + ~CastCreateSessionDescriptionObserver() override {} private: CastExtensionSession* cast_extension_session_; @@ -134,8 +134,7 @@ class CastStatsObserver : public webrtc::StatsObserver { return new rtc::RefCountedObject<CastStatsObserver>(); } - virtual void OnComplete( - const std::vector<webrtc::StatsReport>& reports) override { + void OnComplete(const std::vector<webrtc::StatsReport>& reports) override { typedef webrtc::StatsReport::Values::iterator ValuesIterator; VLOG(1) << "Received " << reports.size() << " new StatsReports."; @@ -153,7 +152,7 @@ class CastStatsObserver : public webrtc::StatsObserver { protected: CastStatsObserver() {} - virtual ~CastStatsObserver() {} + ~CastStatsObserver() override {} DISALLOW_COPY_AND_ASSIGN(CastStatsObserver); }; diff --git a/remoting/host/cast_extension_session.h b/remoting/host/cast_extension_session.h index fe27280..ea20ee6 100644 --- a/remoting/host/cast_extension_session.h +++ b/remoting/host/cast_extension_session.h @@ -44,7 +44,7 @@ struct NetworkSettings; class CastExtensionSession : public HostExtensionSession, public webrtc::PeerConnectionObserver { public: - virtual ~CastExtensionSession(); + ~CastExtensionSession() override; // Creates and returns a CastExtensionSession object, after performing // initialization steps on it. The caller must take ownership of the returned @@ -61,32 +61,29 @@ class CastExtensionSession : public HostExtensionSession, void OnCreateSessionDescriptionFailure(const std::string& error); // HostExtensionSession interface. - virtual void OnCreateVideoCapturer( + void OnCreateVideoCapturer( scoped_ptr<webrtc::DesktopCapturer>* capturer) override; - virtual bool ModifiesVideoPipeline() const override; - virtual bool OnExtensionMessage( - ClientSessionControl* client_session_control, - protocol::ClientStub* client_stub, - const protocol::ExtensionMessage& message) override; + bool ModifiesVideoPipeline() const override; + bool OnExtensionMessage(ClientSessionControl* client_session_control, + protocol::ClientStub* client_stub, + const protocol::ExtensionMessage& message) override; // webrtc::PeerConnectionObserver interface. - virtual void OnError() override; - virtual void OnSignalingChange( + void OnError() override; + void OnSignalingChange( webrtc::PeerConnectionInterface::SignalingState new_state) override; - virtual void OnStateChange( + void OnStateChange( webrtc::PeerConnectionObserver::StateType state_changed) override; - virtual void OnAddStream(webrtc::MediaStreamInterface* stream) override; - virtual void OnRemoveStream(webrtc::MediaStreamInterface* stream) override; - virtual void OnDataChannel( - webrtc::DataChannelInterface* data_channel) override; - virtual void OnRenegotiationNeeded() override; - virtual void OnIceConnectionChange( + void OnAddStream(webrtc::MediaStreamInterface* stream) override; + void OnRemoveStream(webrtc::MediaStreamInterface* stream) override; + void OnDataChannel(webrtc::DataChannelInterface* data_channel) override; + void OnRenegotiationNeeded() override; + void OnIceConnectionChange( webrtc::PeerConnectionInterface::IceConnectionState new_state) override; - virtual void OnIceGatheringChange( + void OnIceGatheringChange( webrtc::PeerConnectionInterface::IceGatheringState new_state) override; - virtual void OnIceCandidate( - const webrtc::IceCandidateInterface* candidate) override; - virtual void OnIceComplete() override; + void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override; + void OnIceComplete() override; private: CastExtensionSession( diff --git a/remoting/host/cast_video_capturer_adapter.h b/remoting/host/cast_video_capturer_adapter.h index fd3ab75..1a39a2e2b7 100644 --- a/remoting/host/cast_video_capturer_adapter.h +++ b/remoting/host/cast_video_capturer_adapter.h @@ -36,24 +36,24 @@ class CastVideoCapturerAdapter : public cricket::VideoCapturer, explicit CastVideoCapturerAdapter( scoped_ptr<webrtc::DesktopCapturer> capturer); - virtual ~CastVideoCapturerAdapter(); + ~CastVideoCapturerAdapter() override; // webrtc::DesktopCapturer::Callback implementation. - virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override; + webrtc::SharedMemory* CreateSharedMemory(size_t size) override; // Converts |frame| to a cricket::CapturedFrame and emits that via // SignalFrameCaptured for the base::VideoCapturer implementation to process. - virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; + void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; // cricket::VideoCapturer implementation. - virtual bool GetBestCaptureFormat(const cricket::VideoFormat& desired, - cricket::VideoFormat* best_format) override; - virtual cricket::CaptureState Start( + bool GetBestCaptureFormat(const cricket::VideoFormat& desired, + cricket::VideoFormat* best_format) override; + cricket::CaptureState Start( const cricket::VideoFormat& capture_format) override; - virtual bool Pause(bool pause) override; - virtual void Stop() override; - virtual bool IsRunning() override; - virtual bool IsScreencast() const override; - virtual bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; + bool Pause(bool pause) override; + void Stop() override; + bool IsRunning() override; + bool IsScreencast() const override; + bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; private: // Kicks off the next frame capture using |desktop_capturer_|. diff --git a/remoting/host/chromium_port_allocator_factory.h b/remoting/host/chromium_port_allocator_factory.h index 8d07e88..85b58d2 100644 --- a/remoting/host/chromium_port_allocator_factory.h +++ b/remoting/host/chromium_port_allocator_factory.h @@ -26,7 +26,7 @@ class ChromiumPortAllocatorFactory scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); // webrtc::PortAllocatorFactoryInterface implementation. - virtual cricket::PortAllocator* CreatePortAllocator( + cricket::PortAllocator* CreatePortAllocator( const std::vector<StunConfiguration>& stun_servers, const std::vector<TurnConfiguration>& turn_configurations) override; @@ -34,7 +34,7 @@ class ChromiumPortAllocatorFactory ChromiumPortAllocatorFactory( const protocol::NetworkSettings& network_settings, scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); - virtual ~ChromiumPortAllocatorFactory(); + ~ChromiumPortAllocatorFactory() override; private: const protocol::NetworkSettings& network_settings_; diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h index 2a01c0e..878b3a8 100644 --- a/remoting/host/chromoting_host.h +++ b/remoting/host/chromoting_host.h @@ -79,7 +79,7 @@ class ChromotingHost : public base::NonThreadSafe, scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); - virtual ~ChromotingHost(); + ~ChromotingHost() override; // Asynchronously starts the host. // @@ -90,8 +90,8 @@ class ChromotingHost : public base::NonThreadSafe, void Start(const std::string& host_owner); // HostStatusMonitor interface. - virtual void AddStatusObserver(HostStatusObserver* observer) override; - virtual void RemoveStatusObserver(HostStatusObserver* observer) override; + void AddStatusObserver(HostStatusObserver* observer) override; + void RemoveStatusObserver(HostStatusObserver* observer) override; // Registers a host extension. void AddExtension(scoped_ptr<HostExtension> extension); @@ -120,19 +120,18 @@ class ChromotingHost : public base::NonThreadSafe, //////////////////////////////////////////////////////////////////////////// // ClientSession::EventHandler implementation. - virtual void OnSessionAuthenticating(ClientSession* client) override; - virtual bool OnSessionAuthenticated(ClientSession* client) override; - virtual void OnSessionChannelsConnected(ClientSession* client) override; - virtual void OnSessionAuthenticationFailed(ClientSession* client) override; - virtual void OnSessionClosed(ClientSession* session) override; - virtual void OnSessionRouteChange( - ClientSession* session, - const std::string& channel_name, - const protocol::TransportRoute& route) override; + void OnSessionAuthenticating(ClientSession* client) override; + bool OnSessionAuthenticated(ClientSession* client) override; + void OnSessionChannelsConnected(ClientSession* client) override; + void OnSessionAuthenticationFailed(ClientSession* client) override; + void OnSessionClosed(ClientSession* session) override; + void OnSessionRouteChange(ClientSession* session, + const std::string& channel_name, + const protocol::TransportRoute& route) override; // SessionManager::Listener implementation. - virtual void OnSessionManagerReady() override; - virtual void OnIncomingSession( + void OnSessionManagerReady() override; + void OnIncomingSession( protocol::Session* session, protocol::SessionManager::IncomingSessionResponse* response) override; diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index a974b59..38f9753 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -99,48 +99,42 @@ class ClientSession const base::TimeDelta& max_duration, scoped_refptr<protocol::PairingRegistry> pairing_registry, const std::vector<HostExtension*>& extensions); - virtual ~ClientSession(); + ~ClientSession() override; // Returns the set of capabilities negotiated between client and host. const std::string& capabilities() const { return capabilities_; } // protocol::HostStub interface. - virtual void NotifyClientResolution( + void NotifyClientResolution( const protocol::ClientResolution& resolution) override; - virtual void ControlVideo( - const protocol::VideoControl& video_control) override; - virtual void ControlAudio( - const protocol::AudioControl& audio_control) override; - virtual void SetCapabilities( - const protocol::Capabilities& capabilities) override; - virtual void RequestPairing( + void ControlVideo(const protocol::VideoControl& video_control) override; + void ControlAudio(const protocol::AudioControl& audio_control) override; + void SetCapabilities(const protocol::Capabilities& capabilities) override; + void RequestPairing( const remoting::protocol::PairingRequest& pairing_request) override; - virtual void DeliverClientMessage( - const protocol::ExtensionMessage& message) override; + void DeliverClientMessage(const protocol::ExtensionMessage& message) override; // protocol::ConnectionToClient::EventHandler interface. - virtual void OnConnectionAuthenticating( + void OnConnectionAuthenticating( protocol::ConnectionToClient* connection) override; - virtual void OnConnectionAuthenticated( + void OnConnectionAuthenticated( protocol::ConnectionToClient* connection) override; - virtual void OnConnectionChannelsConnected( + void OnConnectionChannelsConnected( protocol::ConnectionToClient* connection) override; - virtual void OnConnectionClosed(protocol::ConnectionToClient* connection, - protocol::ErrorCode error) override; - virtual void OnSequenceNumberUpdated( - protocol::ConnectionToClient* connection, int64 sequence_number) override; - virtual void OnRouteChange( - protocol::ConnectionToClient* connection, - const std::string& channel_name, - const protocol::TransportRoute& route) override; + void OnConnectionClosed(protocol::ConnectionToClient* connection, + protocol::ErrorCode error) override; + void OnSequenceNumberUpdated(protocol::ConnectionToClient* connection, + int64 sequence_number) override; + void OnRouteChange(protocol::ConnectionToClient* connection, + const std::string& channel_name, + const protocol::TransportRoute& route) override; // ClientSessionControl interface. - virtual const std::string& client_jid() const override; - virtual void DisconnectSession() override; - virtual void OnLocalMouseMoved( - const webrtc::DesktopVector& position) override; - virtual void SetDisableInputs(bool disable_inputs) override; - virtual void ResetVideoPipeline() override; + const std::string& client_jid() const override; + void DisconnectSession() override; + void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; + void SetDisableInputs(bool disable_inputs) override; + void ResetVideoPipeline() override; void SetGnubbyAuthHandlerForTesting(GnubbyAuthHandler* gnubby_auth_handler); diff --git a/remoting/host/clipboard_mac.mm b/remoting/host/clipboard_mac.mm index b4988a6..48ce852 100644 --- a/remoting/host/clipboard_mac.mm +++ b/remoting/host/clipboard_mac.mm @@ -28,14 +28,12 @@ namespace remoting { class ClipboardMac : public Clipboard { public: ClipboardMac(); - virtual ~ClipboardMac(); + ~ClipboardMac() override; // Must be called on the UI thread. - virtual void Start( - scoped_ptr<protocol::ClipboardStub> client_clipboard) override; - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; - virtual void Stop() override; + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; + void Stop() override; private: void CheckClipboardForChanges(); diff --git a/remoting/host/config_file_watcher.h b/remoting/host/config_file_watcher.h index 407ed40..26a56fd 100644 --- a/remoting/host/config_file_watcher.h +++ b/remoting/host/config_file_watcher.h @@ -30,10 +30,10 @@ class ConfigFileWatcher : public ConfigWatcher { scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, const base::FilePath& config_path); - virtual ~ConfigFileWatcher(); + ~ConfigFileWatcher() override; // Inherited from ConfigWatcher. - virtual void Watch(Delegate* delegate) override; + void Watch(Delegate* delegate) override; private: scoped_refptr<ConfigFileWatcherImpl> impl_; diff --git a/remoting/host/continue_window.h b/remoting/host/continue_window.h index 909bd92..aed2863 100644 --- a/remoting/host/continue_window.h +++ b/remoting/host/continue_window.h @@ -14,11 +14,10 @@ namespace remoting { class ContinueWindow : public HostWindow { public: - virtual ~ContinueWindow(); + ~ContinueWindow() override; // HostWindow override. - virtual void Start( - const base::WeakPtr<ClientSessionControl>& client_session_control) + void Start(const base::WeakPtr<ClientSessionControl>& client_session_control) override; // Resumes paused client session. diff --git a/remoting/host/continue_window_mac.mm b/remoting/host/continue_window_mac.mm index c6dd939..9e76e0a 100644 --- a/remoting/host/continue_window_mac.mm +++ b/remoting/host/continue_window_mac.mm @@ -35,12 +35,12 @@ namespace remoting { class ContinueWindowMac : public ContinueWindow { public: ContinueWindowMac(); - virtual ~ContinueWindowMac(); + ~ContinueWindowMac() override; protected: // ContinueWindow overrides. - virtual void ShowUi() override; - virtual void HideUi() override; + void ShowUi() override; + void HideUi() override; private: base::scoped_nsobject<ContinueWindowMacController> controller_; diff --git a/remoting/host/curtain_mode_mac.cc b/remoting/host/curtain_mode_mac.cc index 57a5b33..b0718e8 100644 --- a/remoting/host/curtain_mode_mac.cc +++ b/remoting/host/curtain_mode_mac.cc @@ -226,10 +226,10 @@ class CurtainModeMac : public CurtainMode { scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, base::WeakPtr<ClientSessionControl> client_session_control); - virtual ~CurtainModeMac(); + ~CurtainModeMac() override; // Overriden from CurtainMode. - virtual bool Activate() override; + bool Activate() override; private: scoped_refptr<SessionWatcher> session_watcher_; diff --git a/remoting/host/daemon_process.h b/remoting/host/daemon_process.h index 4b87312d..0a7b900 100644 --- a/remoting/host/daemon_process.h +++ b/remoting/host/daemon_process.h @@ -46,7 +46,7 @@ class DaemonProcess public: typedef std::list<DesktopSession*> DesktopSessionList; - virtual ~DaemonProcess(); + ~DaemonProcess() override; // Creates a platform-specific implementation of the daemon process object // passing relevant task runners. Public methods of this class must be called @@ -58,17 +58,17 @@ class DaemonProcess const base::Closure& stopped_callback); // ConfigWatcher::Delegate - virtual void OnConfigUpdated(const std::string& serialized_config) override; - virtual void OnConfigWatcherError() override; + void OnConfigUpdated(const std::string& serialized_config) override; + void OnConfigWatcherError() override; // HostStatusMonitor interface. - virtual void AddStatusObserver(HostStatusObserver* observer) override; - virtual void RemoveStatusObserver(HostStatusObserver* observer) override; + void AddStatusObserver(HostStatusObserver* observer) override; + void RemoveStatusObserver(HostStatusObserver* observer) override; // 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; // Sends an IPC message to the network process. The message will be dropped // unless the network process is connected over the IPC channel. diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc index 22877c6..51ca681 100644 --- a/remoting/host/daemon_process_unittest.cc +++ b/remoting/host/daemon_process_unittest.cc @@ -40,10 +40,9 @@ enum Messages { class FakeDesktopSession : public DesktopSession { public: FakeDesktopSession(DaemonProcess* daemon_process, int id); - virtual ~FakeDesktopSession(); + ~FakeDesktopSession() override; - virtual void SetScreenResolution( - const ScreenResolution& resolution) override {} + void SetScreenResolution(const ScreenResolution& resolution) override {} private: DISALLOW_COPY_AND_ASSIGN(FakeDesktopSession); diff --git a/remoting/host/desktop_process.h b/remoting/host/desktop_process.h index b09fb1b..2710504 100644 --- a/remoting/host/desktop_process.h +++ b/remoting/host/desktop_process.h @@ -35,16 +35,16 @@ class DesktopProcess : public DesktopSessionAgent::Delegate, scoped_refptr<AutoThreadTaskRunner> caller_task_runner, scoped_refptr<AutoThreadTaskRunner> input_task_runner, const std::string& daemon_channel_name); - virtual ~DesktopProcess(); + ~DesktopProcess() override; // DesktopSessionAgent::Delegate implementation. - virtual DesktopEnvironmentFactory& desktop_environment_factory() override; - virtual void OnNetworkProcessDisconnected() override; + DesktopEnvironmentFactory& desktop_environment_factory() override; + void OnNetworkProcessDisconnected() override; // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelConnected(int32 peer_pid) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelConnected(int32 peer_pid) override; + void OnChannelError() override; // Injects Secure Attention Sequence. void InjectSas(); diff --git a/remoting/host/desktop_resizer_mac.cc b/remoting/host/desktop_resizer_mac.cc index a4ac574..4bc03cc 100644 --- a/remoting/host/desktop_resizer_mac.cc +++ b/remoting/host/desktop_resizer_mac.cc @@ -24,11 +24,11 @@ class DesktopResizerMac : public DesktopResizer { DesktopResizerMac(); // 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: // If there is a single display, get its id and return true, otherwise return diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc index d4b15a0..6ba38e3 100644 --- a/remoting/host/desktop_session_agent.cc +++ b/remoting/host/desktop_session_agent.cc @@ -39,11 +39,10 @@ class DesktopSesssionClipboardStub : public protocol::ClipboardStub { public: explicit DesktopSesssionClipboardStub( scoped_refptr<DesktopSessionAgent> desktop_session_agent); - virtual ~DesktopSesssionClipboardStub(); + ~DesktopSesssionClipboardStub() override; // protocol::ClipboardStub implementation. - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; private: scoped_refptr<DesktopSessionAgent> desktop_session_agent_; @@ -79,9 +78,7 @@ class DesktopSessionAgent::SharedBuffer : public webrtc::SharedMemory { return make_scoped_ptr(new SharedBuffer(agent, memory.Pass(), size, id)); } - virtual ~SharedBuffer() { - agent_->OnSharedBufferDeleted(id()); - } + ~SharedBuffer() override { agent_->OnSharedBufferDeleted(id()); } private: SharedBuffer(DesktopSessionAgent* agent, diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h index 0aec84d..e3c0b62 100644 --- a/remoting/host/desktop_session_agent.h +++ b/remoting/host/desktop_session_agent.h @@ -71,19 +71,18 @@ class DesktopSessionAgent scoped_refptr<AutoThreadTaskRunner> video_capture_task_runner); // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelConnected(int32 peer_pid) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelConnected(int32 peer_pid) override; + void OnChannelError() override; // webrtc::DesktopCapturer::Callback implementation. - virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override; - virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; + webrtc::SharedMemory* CreateSharedMemory(size_t size) override; + void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; // webrtc::MouseCursorMonitor::Callback implementation. - virtual void OnMouseCursor(webrtc::MouseCursor* cursor) override; - virtual void OnMouseCursorPosition( - webrtc::MouseCursorMonitor::CursorState state, - const webrtc::DesktopVector& position) override; + void OnMouseCursor(webrtc::MouseCursor* cursor) override; + void OnMouseCursorPosition(webrtc::MouseCursorMonitor::CursorState state, + const webrtc::DesktopVector& position) override; // Forwards a local clipboard event though the IPC channel to the network // process. @@ -104,15 +103,14 @@ class DesktopSessionAgent protected: friend class base::RefCountedThreadSafe<DesktopSessionAgent>; - virtual ~DesktopSessionAgent(); + ~DesktopSessionAgent() override; // ClientSessionControl interface. - virtual const std::string& client_jid() const override; - virtual void DisconnectSession() override; - virtual void OnLocalMouseMoved( - const webrtc::DesktopVector& position) override; - virtual void SetDisableInputs(bool disable_inputs) override; - virtual void ResetVideoPipeline() override; + const std::string& client_jid() const override; + void DisconnectSession() override; + void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; + void SetDisableInputs(bool disable_inputs) override; + void ResetVideoPipeline() override; // Handles StartSessionAgent request from the client. void OnStartSessionAgent(const std::string& authenticated_jid, diff --git a/remoting/host/desktop_session_proxy.h b/remoting/host/desktop_session_proxy.h index e40915e..e54e3ec 100644 --- a/remoting/host/desktop_session_proxy.h +++ b/remoting/host/desktop_session_proxy.h @@ -87,9 +87,9 @@ class DesktopSessionProxy void SetCapabilities(const std::string& capabilities); // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelConnected(int32 peer_pid) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelConnected(int32 peer_pid) override; + void OnChannelError() override; // Connects to the desktop session agent. bool AttachToDesktop(base::ProcessHandle desktop_process, @@ -138,7 +138,7 @@ class DesktopSessionProxy class IpcSharedBuffer; typedef std::map<int, scoped_refptr<IpcSharedBufferCore> > SharedBuffers; - virtual ~DesktopSessionProxy(); + ~DesktopSessionProxy() override; // Returns a shared buffer from the list of known buffers. scoped_refptr<IpcSharedBufferCore> GetSharedBufferCore(int id); diff --git a/remoting/host/disconnect_window_mac.mm b/remoting/host/disconnect_window_mac.mm index e999b91..623c3af 100644 --- a/remoting/host/disconnect_window_mac.mm +++ b/remoting/host/disconnect_window_mac.mm @@ -29,11 +29,10 @@ namespace remoting { class DisconnectWindowMac : public HostWindow { public: DisconnectWindowMac(); - virtual ~DisconnectWindowMac(); + ~DisconnectWindowMac() override; // HostWindow overrides. - virtual void Start( - const base::WeakPtr<ClientSessionControl>& client_session_control) + void Start(const base::WeakPtr<ClientSessionControl>& client_session_control) override; private: diff --git a/remoting/host/dns_blackhole_checker.h b/remoting/host/dns_blackhole_checker.h index 38bc055..49d73ca 100644 --- a/remoting/host/dns_blackhole_checker.h +++ b/remoting/host/dns_blackhole_checker.h @@ -25,10 +25,10 @@ class DnsBlackholeChecker : public net::URLFetcherDelegate { DnsBlackholeChecker( scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, std::string talkgadget_prefix); - virtual ~DnsBlackholeChecker(); + ~DnsBlackholeChecker() override; // net::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; // Initiates a check the verify that the host talkgadget has not been "DNS // blackholed" to prevent connections. If this is called again before the diff --git a/remoting/host/fake_desktop_capturer.h b/remoting/host/fake_desktop_capturer.h index c8468c8..7ff8ca5 100644 --- a/remoting/host/fake_desktop_capturer.h +++ b/remoting/host/fake_desktop_capturer.h @@ -29,13 +29,13 @@ class FakeDesktopCapturer : public webrtc::DesktopCapturer { webrtc::DesktopCapturer::Callback* callback)> FrameGenerator; FakeDesktopCapturer(); - virtual ~FakeDesktopCapturer(); + ~FakeDesktopCapturer() override; void set_frame_generator(const FrameGenerator& frame_generator); // webrtc::DesktopCapturer interface. - virtual void Start(Callback* callback) override; - virtual void Capture(const webrtc::DesktopRegion& rect) override; + void Start(Callback* callback) override; + void Capture(const webrtc::DesktopRegion& rect) override; private: FrameGenerator frame_generator_; diff --git a/remoting/host/fake_desktop_environment.h b/remoting/host/fake_desktop_environment.h index 64d293a..043f33f 100644 --- a/remoting/host/fake_desktop_environment.h +++ b/remoting/host/fake_desktop_environment.h @@ -16,30 +16,28 @@ namespace remoting { class FakeInputInjector : public InputInjector { public: FakeInputInjector(); - virtual ~FakeInputInjector(); - - virtual void Start( - scoped_ptr<protocol::ClipboardStub> client_clipboard) override; - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; - virtual void InjectTextEvent(const protocol::TextEvent& event) override; - virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; + ~FakeInputInjector() override; + + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectTextEvent(const protocol::TextEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; }; class FakeScreenControls : public ScreenControls { public: FakeScreenControls(); - virtual ~FakeScreenControls(); + ~FakeScreenControls() override; // ScreenControls implementation. - virtual void SetScreenResolution(const ScreenResolution& resolution) override; + void SetScreenResolution(const ScreenResolution& resolution) override; }; class FakeDesktopEnvironment : public DesktopEnvironment { public: FakeDesktopEnvironment(); - virtual ~FakeDesktopEnvironment(); + ~FakeDesktopEnvironment() override; // Sets frame generator to be used for FakeDesktopCapturer created by // FakeDesktopEnvironment. @@ -49,15 +47,14 @@ class FakeDesktopEnvironment : public DesktopEnvironment { } // 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() - override; - virtual std::string GetCapabilities() const override; - virtual void SetCapabilities(const std::string& capabilities) 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override; + std::string GetCapabilities() const override; + void SetCapabilities(const std::string& capabilities) override; + scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( protocol::ClientStub* client_stub) override; private: @@ -69,7 +66,7 @@ class FakeDesktopEnvironment : public DesktopEnvironment { class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory { public: FakeDesktopEnvironmentFactory(); - virtual ~FakeDesktopEnvironmentFactory(); + ~FakeDesktopEnvironmentFactory() override; // Sets frame generator to be used for FakeDesktopCapturer created by // FakeDesktopEnvironment. @@ -79,11 +76,11 @@ class FakeDesktopEnvironmentFactory : public DesktopEnvironmentFactory { } // DesktopEnvironmentFactory implementation. - virtual scoped_ptr<DesktopEnvironment> Create( + scoped_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control) override; - virtual void SetEnableCurtaining(bool enable) override; - virtual bool SupportsAudioCapture() const override; - virtual void SetEnableGnubbyAuth(bool enable) override; + void SetEnableCurtaining(bool enable) override; + bool SupportsAudioCapture() const override; + void SetEnableGnubbyAuth(bool enable) override; private: FakeDesktopCapturer::FrameGenerator frame_generator_; diff --git a/remoting/host/fake_host_extension.cc b/remoting/host/fake_host_extension.cc index 2a8160a..34c31f9 100644 --- a/remoting/host/fake_host_extension.cc +++ b/remoting/host/fake_host_extension.cc @@ -17,17 +17,16 @@ namespace remoting { class FakeExtension::Session : public HostExtensionSession { public: Session(FakeExtension* extension, const std::string& message_type); - virtual ~Session() {} + ~Session() override {} // HostExtensionSession interface. - virtual void OnCreateVideoCapturer( + void OnCreateVideoCapturer( scoped_ptr<webrtc::DesktopCapturer>* encoder) override; - virtual void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder) override; - virtual bool ModifiesVideoPipeline() const override; - virtual bool OnExtensionMessage( - ClientSessionControl* client_session_control, - protocol::ClientStub* client_stub, - const protocol::ExtensionMessage& message) override; + void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder) override; + bool ModifiesVideoPipeline() const override; + bool OnExtensionMessage(ClientSessionControl* client_session_control, + protocol::ClientStub* client_stub, + const protocol::ExtensionMessage& message) override; private: FakeExtension* extension_; diff --git a/remoting/host/fake_host_extension.h b/remoting/host/fake_host_extension.h index 3b97b74..a50daa9 100644 --- a/remoting/host/fake_host_extension.h +++ b/remoting/host/fake_host_extension.h @@ -24,11 +24,11 @@ class FakeExtension : public HostExtension { public: FakeExtension(const std::string& message_type, const std::string& capability); - virtual ~FakeExtension(); + ~FakeExtension() override; // HostExtension interface. - virtual std::string capability() const override; - virtual scoped_ptr<HostExtensionSession> CreateExtensionSession( + std::string capability() const override; + scoped_ptr<HostExtensionSession> CreateExtensionSession( ClientSessionControl* client_session_control, protocol::ClientStub* client_stub) override; diff --git a/remoting/host/fake_host_status_monitor.h b/remoting/host/fake_host_status_monitor.h index dd85795..7c9e7ee 100644 --- a/remoting/host/fake_host_status_monitor.h +++ b/remoting/host/fake_host_status_monitor.h @@ -15,11 +15,11 @@ class FakeHostStatusMonitor : public base::SupportsWeakPtr<FakeHostStatusMonitor>, public HostStatusMonitor { public: - virtual ~FakeHostStatusMonitor() {} + ~FakeHostStatusMonitor() override {} // HostStatusMonitor interface. - virtual void AddStatusObserver(HostStatusObserver* observer) override {} - virtual void RemoveStatusObserver(HostStatusObserver* observer) override {} + void AddStatusObserver(HostStatusObserver* observer) override {} + void RemoveStatusObserver(HostStatusObserver* observer) override {} }; } // namespace remoting diff --git a/remoting/host/fake_mouse_cursor_monitor.h b/remoting/host/fake_mouse_cursor_monitor.h index ebb20c5..c53a355 100644 --- a/remoting/host/fake_mouse_cursor_monitor.h +++ b/remoting/host/fake_mouse_cursor_monitor.h @@ -12,10 +12,10 @@ namespace remoting { class FakeMouseCursorMonitor : public webrtc::MouseCursorMonitor { public: FakeMouseCursorMonitor(); - virtual ~FakeMouseCursorMonitor(); + ~FakeMouseCursorMonitor() override; - virtual void Init(Callback* callback, Mode mode) override; - virtual void Capture() override; + void Init(Callback* callback, Mode mode) override; + void Capture() override; private: Callback* callback_; diff --git a/remoting/host/gnubby_auth_handler_posix.h b/remoting/host/gnubby_auth_handler_posix.h index 99e9256..d1af652 100644 --- a/remoting/host/gnubby_auth_handler_posix.h +++ b/remoting/host/gnubby_auth_handler_posix.h @@ -30,7 +30,7 @@ class GnubbyAuthHandlerPosix : public GnubbyAuthHandler, public net::StreamListenSocket::Delegate { public: explicit GnubbyAuthHandlerPosix(protocol::ClientStub* client_stub); - virtual ~GnubbyAuthHandlerPosix(); + ~GnubbyAuthHandlerPosix() override; bool HasActiveSocketForTesting(net::StreamListenSocket* socket) const; int GetConnectionIdForTesting(net::StreamListenSocket* socket) const; @@ -41,17 +41,17 @@ class GnubbyAuthHandlerPosix : public GnubbyAuthHandler, typedef std::map<int, GnubbySocket*> ActiveSockets; // 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; // StreamListenSocket::Delegate interface. - virtual void DidAccept(net::StreamListenSocket* server, - scoped_ptr<net::StreamListenSocket> socket) override; - virtual void DidRead(net::StreamListenSocket* socket, - const char* data, - int len) override; - virtual void DidClose(net::StreamListenSocket* socket) override; + void DidAccept(net::StreamListenSocket* server, + scoped_ptr<net::StreamListenSocket> socket) override; + void DidRead(net::StreamListenSocket* socket, + const char* data, + int len) override; + void DidClose(net::StreamListenSocket* socket) override; // Create socket for authorization. void CreateAuthorizationSocket(); diff --git a/remoting/host/gnubby_auth_handler_posix_unittest.cc b/remoting/host/gnubby_auth_handler_posix_unittest.cc index 139a560..2a055ac 100644 --- a/remoting/host/gnubby_auth_handler_posix_unittest.cc +++ b/remoting/host/gnubby_auth_handler_posix_unittest.cc @@ -42,10 +42,10 @@ class MockStreamListenSocket : public net::StreamListenSocket { explicit MockStreamListenSocket(net::StreamListenSocket::Delegate* delegate) : StreamListenSocket(net::kInvalidSocket, delegate) {} - virtual void Accept() override { NOTREACHED(); } + void Accept() override { NOTREACHED(); } private: - virtual ~MockStreamListenSocket() {} + ~MockStreamListenSocket() override {} }; } // namespace diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h index a3f3057..1eafad4 100644 --- a/remoting/host/heartbeat_sender.h +++ b/remoting/host/heartbeat_sender.h @@ -98,13 +98,11 @@ class HeartbeatSender : public SignalStrategy::Listener { SignalStrategy* signal_strategy, scoped_refptr<RsaKeyPair> key_pair, const std::string& directory_bot_jid); - virtual ~HeartbeatSender(); + ~HeartbeatSender() override; // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; private: FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); diff --git a/remoting/host/host_change_notification_listener.h b/remoting/host/host_change_notification_listener.h index e7ff2fe..c24f74b 100644 --- a/remoting/host/host_change_notification_listener.h +++ b/remoting/host/host_change_notification_listener.h @@ -37,13 +37,11 @@ class HostChangeNotificationListener : public SignalStrategy::Listener { const std::string& host_id, SignalStrategy* signal_strategy, const std::string& directory_bot_jid); - virtual ~HostChangeNotificationListener(); + ~HostChangeNotificationListener() override; // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; private: void OnHostDeleted(); diff --git a/remoting/host/host_event_logger_posix.cc b/remoting/host/host_event_logger_posix.cc index eb25429..231d683 100644 --- a/remoting/host/host_event_logger_posix.cc +++ b/remoting/host/host_event_logger_posix.cc @@ -26,19 +26,18 @@ class HostEventLoggerPosix : public HostEventLogger, public HostStatusObserver { HostEventLoggerPosix(base::WeakPtr<HostStatusMonitor> monitor, const std::string& application_name); - virtual ~HostEventLoggerPosix(); + ~HostEventLoggerPosix() 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( - 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 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; + void OnStart(const std::string& xmpp_login) override; + void OnShutdown() override; private: void Log(const std::string& message); diff --git a/remoting/host/host_status_logger.h b/remoting/host/host_status_logger.h index 37cc08c..1ee43a4 100644 --- a/remoting/host/host_status_logger.h +++ b/remoting/host/host_status_logger.h @@ -27,19 +27,18 @@ class HostStatusLogger : public HostStatusObserver, ServerLogEntry::Mode mode, SignalStrategy* signal_strategy, const std::string& directory_bot_jid); - virtual ~HostStatusLogger(); + ~HostStatusLogger() override; // Logs a session state change. Currently, this is either // connection or disconnection. void LogSessionStateChange(const std::string& jid, bool connected); // HostStatusObserver interface. - virtual void OnClientConnected(const std::string& jid) override; - virtual void OnClientDisconnected(const std::string& jid) override; - virtual void OnClientRouteChange( - const std::string& jid, - const std::string& channel_name, - const protocol::TransportRoute& route) override; + void OnClientConnected(const std::string& jid) override; + void OnClientDisconnected(const std::string& jid) override; + void OnClientRouteChange(const std::string& jid, + const std::string& channel_name, + const protocol::TransportRoute& route) override; // Allows test code to fake SignalStrategy state change events. void SetSignalingStateForTest(SignalStrategy::State state); diff --git a/remoting/host/host_status_sender.h b/remoting/host/host_status_sender.h index b3ce5e4..d1e14ae 100644 --- a/remoting/host/host_status_sender.h +++ b/remoting/host/host_status_sender.h @@ -59,13 +59,11 @@ class HostStatusSender : SignalStrategy::Listener { SignalStrategy* signal_strategy, scoped_refptr<RsaKeyPair> key_pair, const std::string& directory_bot_jid); - virtual ~HostStatusSender(); + ~HostStatusSender() override; // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; // APIs for sending host status XMPP messages to the chromoting bot. // status: the reason (exit code) why the host is offline. diff --git a/remoting/host/host_window_proxy.cc b/remoting/host/host_window_proxy.cc index 6e806d2..bdaf519 100644 --- a/remoting/host/host_window_proxy.cc +++ b/remoting/host/host_window_proxy.cc @@ -30,19 +30,18 @@ class HostWindowProxy::Core private: friend class base::RefCountedThreadSafe<Core>; - virtual ~Core(); + ~Core() override; // Start() and Stop() equivalents called on the |ui_task_runner_| thread. void StartOnUiThread(const std::string& client_jid); void StopOnUiThread(); // ClientSessionControl interface. - virtual const std::string& client_jid() const override; - virtual void DisconnectSession() override; - virtual void OnLocalMouseMoved( - const webrtc::DesktopVector& position) override; - virtual void SetDisableInputs(bool disable_inputs) override; - virtual void ResetVideoPipeline() override; + const std::string& client_jid() const override; + void DisconnectSession() override; + void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; + void SetDisableInputs(bool disable_inputs) override; + void ResetVideoPipeline() override; // Task runner on which public methods of this class must be called. scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; diff --git a/remoting/host/host_window_proxy.h b/remoting/host/host_window_proxy.h index 8c4828e..f0748204 100644 --- a/remoting/host/host_window_proxy.h +++ b/remoting/host/host_window_proxy.h @@ -24,11 +24,10 @@ class HostWindowProxy : public HostWindow { scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, scoped_ptr<HostWindow> host_window); - virtual ~HostWindowProxy(); + ~HostWindowProxy() override; // HostWindow overrides. - virtual void Start( - const base::WeakPtr<ClientSessionControl>& client_session_control) + void Start(const base::WeakPtr<ClientSessionControl>& client_session_control) override; private: diff --git a/remoting/host/in_memory_host_config.h b/remoting/host/in_memory_host_config.h index 48a9673..dca9de1 100644 --- a/remoting/host/in_memory_host_config.h +++ b/remoting/host/in_memory_host_config.h @@ -22,21 +22,19 @@ class InMemoryHostConfig : public MutableHostConfig, public base::NonThreadSafe { public: InMemoryHostConfig(); - virtual ~InMemoryHostConfig(); + ~InMemoryHostConfig() override; // MutableHostConfig interface. - virtual bool GetString(const std::string& path, - std::string* out_value) const override; - virtual bool GetBoolean(const std::string& path, - bool* out_value) const override; + bool GetString(const std::string& path, + std::string* out_value) const override; + bool GetBoolean(const std::string& path, bool* out_value) const override; - virtual void SetString(const std::string& path, - const std::string& in_value) override; - virtual void SetBoolean(const std::string& path, bool in_value) override; + void SetString(const std::string& path, const std::string& in_value) override; + void SetBoolean(const std::string& path, bool in_value) override; - virtual bool CopyFrom(const base::DictionaryValue* dictionary) override; + bool CopyFrom(const base::DictionaryValue* dictionary) override; - virtual bool Save() override; + bool Save() override; protected: scoped_ptr<base::DictionaryValue> values_; diff --git a/remoting/host/input_injector_mac.cc b/remoting/host/input_injector_mac.cc index 683fa0b..b51b615 100644 --- a/remoting/host/input_injector_mac.cc +++ b/remoting/host/input_injector_mac.cc @@ -60,19 +60,18 @@ class InputInjectorMac : public InputInjector { public: explicit InputInjectorMac( scoped_refptr<base::SingleThreadTaskRunner> task_runner); - virtual ~InputInjectorMac(); + ~InputInjectorMac() override; // ClipboardStub interface. - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; // InputStub interface. - virtual void InjectKeyEvent(const KeyEvent& event) override; - virtual void InjectTextEvent(const TextEvent& event) override; - virtual void InjectMouseEvent(const MouseEvent& event) override; + void InjectKeyEvent(const KeyEvent& event) override; + void InjectTextEvent(const TextEvent& event) override; + void InjectMouseEvent(const MouseEvent& event) override; // InputInjector interface. - virtual void Start( - scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; private: // The actual implementation resides in InputInjectorMac::Core class. diff --git a/remoting/host/ipc_audio_capturer.h b/remoting/host/ipc_audio_capturer.h index 57d2cad..d0bdbe3 100644 --- a/remoting/host/ipc_audio_capturer.h +++ b/remoting/host/ipc_audio_capturer.h @@ -20,12 +20,12 @@ class IpcAudioCapturer : public AudioCapturer { public: explicit IpcAudioCapturer( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); - virtual ~IpcAudioCapturer(); + ~IpcAudioCapturer() override; // AudioCapturer interface. - virtual bool Start(const PacketCapturedCallback& callback) override; - virtual void Stop() override; - virtual bool IsStarted() override; + bool Start(const PacketCapturedCallback& callback) override; + void Stop() override; + bool IsStarted() override; // Called by DesktopSessionProxy when an audio packet is received. void OnAudioPacket(scoped_ptr<AudioPacket> packet); diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h index 8490780..bc829ee 100644 --- a/remoting/host/ipc_desktop_environment.h +++ b/remoting/host/ipc_desktop_environment.h @@ -46,18 +46,17 @@ class IpcDesktopEnvironment : public DesktopEnvironment { base::WeakPtr<ClientSessionControl> client_session_control, base::WeakPtr<DesktopSessionConnector> desktop_session_connector, bool virtual_terminal); - virtual ~IpcDesktopEnvironment(); + ~IpcDesktopEnvironment() override; // 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() - override; - virtual std::string GetCapabilities() const override; - virtual void SetCapabilities(const std::string& capabilities) 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<webrtc::MouseCursorMonitor> CreateMouseCursorMonitor() override; + std::string GetCapabilities() const override; + void SetCapabilities(const std::string& capabilities) override; + scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( protocol::ClientStub* client_stub) override; private: @@ -80,29 +79,26 @@ class IpcDesktopEnvironmentFactory scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, IPC::Sender* daemon_channel); - virtual ~IpcDesktopEnvironmentFactory(); + ~IpcDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory implementation. - virtual scoped_ptr<DesktopEnvironment> Create( + scoped_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control) override; - virtual void SetEnableCurtaining(bool enable) override; - virtual bool SupportsAudioCapture() const override; + void SetEnableCurtaining(bool enable) override; + bool SupportsAudioCapture() const override; // DesktopSessionConnector implementation. - virtual void ConnectTerminal( - DesktopSessionProxy* desktop_session_proxy, - const ScreenResolution& resolution, - bool virtual_terminal) override; - virtual void DisconnectTerminal( - DesktopSessionProxy* desktop_session_proxy) override; - virtual void SetScreenResolution( - DesktopSessionProxy* desktop_session_proxy, - const ScreenResolution& resolution) override; - virtual void OnDesktopSessionAgentAttached( + void ConnectTerminal(DesktopSessionProxy* desktop_session_proxy, + const ScreenResolution& resolution, + bool virtual_terminal) override; + void DisconnectTerminal(DesktopSessionProxy* desktop_session_proxy) override; + void SetScreenResolution(DesktopSessionProxy* desktop_session_proxy, + const ScreenResolution& resolution) override; + void OnDesktopSessionAgentAttached( int terminal_id, base::ProcessHandle desktop_process, IPC::PlatformFileForTransit desktop_pipe) override; - virtual void OnTerminalDisconnected(int terminal_id) override; + void OnTerminalDisconnected(int terminal_id) override; private: // Used to run the audio capturer. diff --git a/remoting/host/ipc_host_event_logger.h b/remoting/host/ipc_host_event_logger.h index f9e6189..07ab668 100644 --- a/remoting/host/ipc_host_event_logger.h +++ b/remoting/host/ipc_host_event_logger.h @@ -31,19 +31,18 @@ class IpcHostEventLogger // Initializes the logger. |daemon_channel| must outlive this object. IpcHostEventLogger(base::WeakPtr<HostStatusMonitor> monitor, IPC::Sender* daemon_channel); - virtual ~IpcHostEventLogger(); + ~IpcHostEventLogger() override; // HostStatusObserver interface. - virtual void OnAccessDenied(const std::string& jid) override; - virtual void OnClientAuthenticated(const std::string& jid) override; - virtual void OnClientConnected(const std::string& jid) override; - virtual void OnClientDisconnected(const std::string& jid) override; - virtual 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 OnAccessDenied(const std::string& jid) override; + void OnClientAuthenticated(const std::string& jid) override; + void OnClientConnected(const std::string& jid) override; + void OnClientDisconnected(const std::string& jid) override; + void OnClientRouteChange(const std::string& jid, + const std::string& channel_name, + const protocol::TransportRoute& route) override; + void OnStart(const std::string& xmpp_login) override; + void OnShutdown() override; private: // Used to report host status events to the daemon. diff --git a/remoting/host/ipc_input_injector.h b/remoting/host/ipc_input_injector.h index 83fa3b9..2c08d9c 100644 --- a/remoting/host/ipc_input_injector.h +++ b/remoting/host/ipc_input_injector.h @@ -19,20 +19,18 @@ class IpcInputInjector : public InputInjector { public: explicit IpcInputInjector( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); - virtual ~IpcInputInjector(); + ~IpcInputInjector() override; // ClipboardStub interface. - virtual void InjectClipboardEvent( - const protocol::ClipboardEvent& event) override; + void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; // InputStub interface. - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; - virtual void InjectTextEvent(const protocol::TextEvent& event) override; - virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectTextEvent(const protocol::TextEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; // InputInjector interface. - virtual void Start( - scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; private: // Wraps the IPC channel to the desktop process. diff --git a/remoting/host/ipc_mouse_cursor_monitor.h b/remoting/host/ipc_mouse_cursor_monitor.h index ee37341..f020cb7 100644 --- a/remoting/host/ipc_mouse_cursor_monitor.h +++ b/remoting/host/ipc_mouse_cursor_monitor.h @@ -21,11 +21,11 @@ class IpcMouseCursorMonitor : public webrtc::MouseCursorMonitor { public: explicit IpcMouseCursorMonitor( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); - virtual ~IpcMouseCursorMonitor(); + ~IpcMouseCursorMonitor() override; // webrtc::MouseCursorMonitor interface. - virtual void Init(Callback* callback, Mode mode) override; - virtual void Capture() override; + void Init(Callback* callback, Mode mode) override; + void Capture() override; // Called when the cursor shape has changed. void OnMouseCursor(scoped_ptr<webrtc::MouseCursor> cursor); diff --git a/remoting/host/ipc_screen_controls.h b/remoting/host/ipc_screen_controls.h index feb4807..e2abb3e 100644 --- a/remoting/host/ipc_screen_controls.h +++ b/remoting/host/ipc_screen_controls.h @@ -18,10 +18,10 @@ class IpcScreenControls : public ScreenControls { public: explicit IpcScreenControls( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); - virtual ~IpcScreenControls(); + ~IpcScreenControls() override; // SessionController interface. - virtual void SetScreenResolution(const ScreenResolution& resolution) override; + void SetScreenResolution(const ScreenResolution& resolution) override; private: // Wraps the IPC channel to the desktop session agent. diff --git a/remoting/host/ipc_video_frame_capturer.h b/remoting/host/ipc_video_frame_capturer.h index db27f98..67bfe10 100644 --- a/remoting/host/ipc_video_frame_capturer.h +++ b/remoting/host/ipc_video_frame_capturer.h @@ -20,11 +20,11 @@ class IpcVideoFrameCapturer : public webrtc::DesktopCapturer { public: explicit IpcVideoFrameCapturer( scoped_refptr<DesktopSessionProxy> desktop_session_proxy); - virtual ~IpcVideoFrameCapturer(); + ~IpcVideoFrameCapturer() override; // webrtc::DesktopCapturer interface. - virtual void Start(Callback* callback) override; - virtual void Capture(const webrtc::DesktopRegion& region) override; + void Start(Callback* callback) override; + void Capture(const webrtc::DesktopRegion& region) override; // Called when a video |frame| has been captured. void OnCaptureCompleted(scoped_ptr<webrtc::DesktopFrame> frame); diff --git a/remoting/host/it2me/it2me_host.h b/remoting/host/it2me/it2me_host.h index c24f2d1..349232d 100644 --- a/remoting/host/it2me/it2me_host.h +++ b/remoting/host/it2me/it2me_host.h @@ -80,16 +80,16 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, virtual void RequestNatPolicy(); // remoting::HostStatusObserver implementation. - virtual void OnAccessDenied(const std::string& jid) override; - virtual void OnClientAuthenticated(const std::string& jid) override; - virtual void OnClientDisconnected(const std::string& jid) override; + void OnAccessDenied(const std::string& jid) override; + void OnClientAuthenticated(const std::string& jid) override; + void OnClientDisconnected(const std::string& jid) override; void SetStateForTesting(It2MeHostState state) { SetState(state); } protected: friend class base::RefCountedThreadSafe<It2MeHost>; - virtual ~It2MeHost(); + ~It2MeHost() override; ChromotingHostContext* host_context() { return host_context_; } scoped_refptr<base::SingleThreadTaskRunner> task_runner() { diff --git a/remoting/host/it2me/it2me_native_messaging_host.h b/remoting/host/it2me/it2me_native_messaging_host.h index 18e738b..1780d73 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.h +++ b/remoting/host/it2me/it2me_native_messaging_host.h @@ -25,21 +25,19 @@ class It2MeNativeMessagingHost : public It2MeHost::Observer, public: It2MeNativeMessagingHost(scoped_refptr<AutoThreadTaskRunner> task_runner, scoped_ptr<It2MeHostFactory> factory); - virtual ~It2MeNativeMessagingHost(); + ~It2MeNativeMessagingHost() override; // extensions::NativeMessageHost implementation. - virtual void OnMessage(const std::string& message) override; - virtual void Start(Client* client) override; - virtual scoped_refptr<base::SingleThreadTaskRunner> task_runner() - const override; + void OnMessage(const std::string& message) override; + void Start(Client* client) override; + scoped_refptr<base::SingleThreadTaskRunner> task_runner() const override; // It2MeHost::Observer implementation. - virtual void OnClientAuthenticated(const std::string& client_username) - override; - virtual void OnStoreAccessCode(const std::string& access_code, - base::TimeDelta access_code_lifetime) override; - virtual void OnNatPolicyChanged(bool nat_traversal_enabled) override; - virtual void OnStateChanged(It2MeHostState state) override; + void OnClientAuthenticated(const std::string& client_username) override; + void OnStoreAccessCode(const std::string& access_code, + base::TimeDelta access_code_lifetime) override; + void OnNatPolicyChanged(bool nat_traversal_enabled) override; + void OnStateChanged(It2MeHostState state) override; static std::string HostStateToString(It2MeHostState host_state); diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc index 61334cf..e0f98f2 100644 --- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc +++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc @@ -79,12 +79,12 @@ class MockIt2MeHost : public It2MeHost { directory_bot_jid) {} // It2MeHost overrides - virtual void Connect() override; - virtual void Disconnect() override; - virtual void RequestNatPolicy() override; + void Connect() override; + void Disconnect() override; + void RequestNatPolicy() override; private: - virtual ~MockIt2MeHost() {} + ~MockIt2MeHost() override {} void RunSetState(It2MeHostState state); @@ -149,7 +149,7 @@ void MockIt2MeHost::RunSetState(It2MeHostState state) { class MockIt2MeHostFactory : public It2MeHostFactory { public: MockIt2MeHostFactory() {} - virtual scoped_refptr<It2MeHost> CreateIt2MeHost( + scoped_refptr<It2MeHost> CreateIt2MeHost( ChromotingHostContext* context, scoped_refptr<base::SingleThreadTaskRunner> task_runner, base::WeakPtr<It2MeHost::Observer> observer, diff --git a/remoting/host/it2me_desktop_environment.h b/remoting/host/it2me_desktop_environment.h index eaa7701..c8c3c32 100644 --- a/remoting/host/it2me_desktop_environment.h +++ b/remoting/host/it2me_desktop_environment.h @@ -18,7 +18,7 @@ class LocalInputMonitor; // the local user. class It2MeDesktopEnvironment : public BasicDesktopEnvironment { public: - virtual ~It2MeDesktopEnvironment(); + ~It2MeDesktopEnvironment() override; protected: friend class It2MeDesktopEnvironmentFactory; @@ -48,10 +48,10 @@ class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); - virtual ~It2MeDesktopEnvironmentFactory(); + ~It2MeDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. - virtual scoped_ptr<DesktopEnvironment> Create( + scoped_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control) override; private: diff --git a/remoting/host/json_host_config.h b/remoting/host/json_host_config.h index 9932ae0..7852cb5 100644 --- a/remoting/host/json_host_config.h +++ b/remoting/host/json_host_config.h @@ -20,12 +20,12 @@ namespace remoting { class JsonHostConfig : public InMemoryHostConfig { public: JsonHostConfig(const base::FilePath& filename); - virtual ~JsonHostConfig(); + ~JsonHostConfig() override; virtual bool Read(); // MutableHostConfig interface. - virtual bool Save() override; + bool Save() override; std::string GetSerializedData(); diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm index 8ffdb72..d425658 100644 --- a/remoting/host/local_input_monitor_mac.mm +++ b/remoting/host/local_input_monitor_mac.mm @@ -43,7 +43,7 @@ class LocalInputMonitorMac : public base::NonThreadSafe, scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, base::WeakPtr<ClientSessionControl> client_session_control); - virtual ~LocalInputMonitorMac(); + ~LocalInputMonitorMac() override; private: // The actual implementation resides in LocalInputMonitorMac::Core class. @@ -168,15 +168,14 @@ class LocalInputMonitorMac::Core private: friend class base::RefCountedThreadSafe<Core>; - virtual ~Core(); + ~Core() override; void StartOnUiThread(); void StopOnUiThread(); // EventHandler interface. - virtual void OnLocalMouseMoved( - const webrtc::DesktopVector& position) override; - virtual void OnDisconnectShortcut() override; + void OnLocalMouseMoved(const webrtc::DesktopVector& position) override; + void OnDisconnectShortcut() override; // Task runner on which public methods of this class must be called. scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; diff --git a/remoting/host/me2me_desktop_environment.h b/remoting/host/me2me_desktop_environment.h index 95b3f22..40ba282 100644 --- a/remoting/host/me2me_desktop_environment.h +++ b/remoting/host/me2me_desktop_environment.h @@ -17,12 +17,12 @@ class LocalInputMonitor; // notifications on Linux. class Me2MeDesktopEnvironment : public BasicDesktopEnvironment { public: - virtual ~Me2MeDesktopEnvironment(); + ~Me2MeDesktopEnvironment() override; // DesktopEnvironment interface. - virtual scoped_ptr<ScreenControls> CreateScreenControls() override; - virtual std::string GetCapabilities() const override; - virtual scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( + scoped_ptr<ScreenControls> CreateScreenControls() override; + std::string GetCapabilities() const override; + scoped_ptr<GnubbyAuthHandler> CreateGnubbyAuthHandler( protocol::ClientStub* client_stub) override; protected: @@ -64,13 +64,13 @@ class Me2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory { scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner); - virtual ~Me2MeDesktopEnvironmentFactory(); + ~Me2MeDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. - virtual scoped_ptr<DesktopEnvironment> Create( + scoped_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control) override; - virtual void SetEnableCurtaining(bool enable) override; - virtual void SetEnableGnubbyAuth(bool enable) override; + void SetEnableCurtaining(bool enable) override; + void SetEnableGnubbyAuth(bool enable) override; protected: bool curtain_enabled() const { return curtain_enabled_; } diff --git a/remoting/host/mouse_clamping_filter.h b/remoting/host/mouse_clamping_filter.h index ebe6cf9..994abbe 100644 --- a/remoting/host/mouse_clamping_filter.h +++ b/remoting/host/mouse_clamping_filter.h @@ -17,7 +17,7 @@ namespace remoting { class MouseClampingFilter : public protocol::VideoStub { public: explicit MouseClampingFilter(protocol::InputStub* input_stub); - virtual ~MouseClampingFilter(); + ~MouseClampingFilter() override; protocol::InputStub* input_filter() { return &input_filter_; } @@ -26,8 +26,8 @@ class MouseClampingFilter : public protocol::VideoStub { } // protocol::VideoStub implementation. - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, - const base::Closure& done) override; + void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, + const base::Closure& done) override; private: // Clamps mouse event coordinates to the video dimensions. diff --git a/remoting/host/native_messaging/native_messaging_pipe.h b/remoting/host/native_messaging/native_messaging_pipe.h index 24a16f7..927b8d3 100644 --- a/remoting/host/native_messaging/native_messaging_pipe.h +++ b/remoting/host/native_messaging/native_messaging_pipe.h @@ -22,7 +22,7 @@ class NativeMessagingPipe public extensions::NativeMessageHost::Client { public: NativeMessagingPipe(); - virtual ~NativeMessagingPipe(); + ~NativeMessagingPipe() override; // Starts processing messages from the pipe. void Start(scoped_ptr<extensions::NativeMessageHost> host, @@ -30,12 +30,12 @@ class NativeMessagingPipe const base::Closure& quit_closure); // extensions::NativeMessageHost::Client implementation. - virtual void PostMessageFromNativeHost(const std::string& message) override; - virtual void CloseChannel(const std::string& error_message) override; + void PostMessageFromNativeHost(const std::string& message) override; + void CloseChannel(const std::string& error_message) override; // extensions::NativeMessagingChannel::EventHandler implementation. - virtual void OnMessage(scoped_ptr<base::Value> message) override; - virtual void OnDisconnect() override; + void OnMessage(scoped_ptr<base::Value> message) override; + void OnDisconnect() override; private: base::Closure quit_closure_; diff --git a/remoting/host/native_messaging/pipe_messaging_channel.h b/remoting/host/native_messaging/pipe_messaging_channel.h index fef1dac..06fbf2ae 100644 --- a/remoting/host/native_messaging/pipe_messaging_channel.h +++ b/remoting/host/native_messaging/pipe_messaging_channel.h @@ -35,11 +35,11 @@ class PipeMessagingChannel : public extensions::NativeMessagingChannel, // Constructs an object taking the ownership of |input| and |output|. Closes // |input| and |output| to prevent the caller from using them. PipeMessagingChannel(base::File input, base::File output); - virtual ~PipeMessagingChannel(); + ~PipeMessagingChannel() override; // extensions::NativeMessagingChannel implementation. - virtual void Start(EventHandler* event_handler) override; - virtual void SendMessage(scoped_ptr<base::Value> message) override; + void Start(EventHandler* event_handler) override; + void SendMessage(scoped_ptr<base::Value> message) override; private: // Processes a message received from the client app. diff --git a/remoting/host/oauth_token_getter.h b/remoting/host/oauth_token_getter.h index ffc1355..20b6079 100644 --- a/remoting/host/oauth_token_getter.h +++ b/remoting/host/oauth_token_getter.h @@ -60,20 +60,20 @@ class OAuthTokenGetter : scoped_ptr<OAuthCredentials> oauth_credentials, scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, bool auto_refresh); - virtual ~OAuthTokenGetter(); + ~OAuthTokenGetter() override; // Call |on_access_token| with an access token, or the failure status. void CallWithToken(const OAuthTokenGetter::TokenCallback& on_access_token); // gaia::GaiaOAuthClient::Delegate interface. - virtual void OnGetTokensResponse(const std::string& user_email, - const std::string& access_token, - int expires_seconds) override; - virtual void OnRefreshTokenResponse(const std::string& access_token, - int expires_in_seconds) override; - virtual void OnGetUserEmailResponse(const std::string& user_email) override; - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnGetTokensResponse(const std::string& user_email, + const std::string& access_token, + int expires_seconds) override; + void OnRefreshTokenResponse(const std::string& access_token, + int expires_in_seconds) override; + void OnGetUserEmailResponse(const std::string& user_email) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; private: void NotifyCallbacks(Status status, diff --git a/remoting/host/pam_authorization_factory_posix.cc b/remoting/host/pam_authorization_factory_posix.cc index 9e675c5..72f89d5 100644 --- a/remoting/host/pam_authorization_factory_posix.cc +++ b/remoting/host/pam_authorization_factory_posix.cc @@ -20,17 +20,17 @@ namespace { class PamAuthorizer : public protocol::Authenticator { public: PamAuthorizer(scoped_ptr<protocol::Authenticator> underlying); - virtual ~PamAuthorizer(); + ~PamAuthorizer() override; // protocol::Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; - virtual scoped_ptr<protocol::ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; + scoped_ptr<protocol::ChannelAuthenticator> CreateChannelAuthenticator() + const override; private: void MaybeCheckLocalLogin(); diff --git a/remoting/host/pam_authorization_factory_posix.h b/remoting/host/pam_authorization_factory_posix.h index 7931dcf..2a084a6 100644 --- a/remoting/host/pam_authorization_factory_posix.h +++ b/remoting/host/pam_authorization_factory_posix.h @@ -18,9 +18,9 @@ class PamAuthorizationFactory : public protocol::AuthenticatorFactory { public: PamAuthorizationFactory( scoped_ptr<protocol::AuthenticatorFactory> underlying); - virtual ~PamAuthorizationFactory(); + ~PamAuthorizationFactory() override; - virtual scoped_ptr<protocol::Authenticator> CreateAuthenticator( + scoped_ptr<protocol::Authenticator> CreateAuthenticator( const std::string& local_jid, const std::string& remote_jid, const buzz::XmlElement* first_message) override; diff --git a/remoting/host/policy_hack/fake_policy_watcher.h b/remoting/host/policy_hack/fake_policy_watcher.h index 2543f9c..7faf3a0 100644 --- a/remoting/host/policy_hack/fake_policy_watcher.h +++ b/remoting/host/policy_hack/fake_policy_watcher.h @@ -14,14 +14,14 @@ class FakePolicyWatcher : public PolicyWatcher { public: explicit FakePolicyWatcher( scoped_refptr<base::SingleThreadTaskRunner> task_runner); - virtual ~FakePolicyWatcher(); + ~FakePolicyWatcher() override; void SetPolicies(const base::DictionaryValue* policies); protected: - virtual void StartWatchingInternal() override; - virtual void StopWatchingInternal() override; - virtual void Reload() override; + void StartWatchingInternal() override; + void StopWatchingInternal() override; + void Reload() override; }; } // namespace policy_hack diff --git a/remoting/host/policy_hack/policy_watcher_mac.mm b/remoting/host/policy_hack/policy_watcher_mac.mm index c5c3a4d..7779db6 100644 --- a/remoting/host/policy_hack/policy_watcher_mac.mm +++ b/remoting/host/policy_hack/policy_watcher_mac.mm @@ -28,18 +28,14 @@ class PolicyWatcherMac : public PolicyWatcher { : PolicyWatcher(task_runner) { } - virtual ~PolicyWatcherMac() { - } + ~PolicyWatcherMac() override {} protected: - virtual void StartWatchingInternal() override { - Reload(); - } + void StartWatchingInternal() override { Reload(); } - virtual void StopWatchingInternal() override { - } + void StopWatchingInternal() override {} - virtual void Reload() override { + void Reload() override { DCHECK(OnPolicyWatcherThread()); base::DictionaryValue policy; diff --git a/remoting/host/posix/signal_handler.cc b/remoting/host/posix/signal_handler.cc index db9d0ee..30abf59 100644 --- a/remoting/host/posix/signal_handler.cc +++ b/remoting/host/posix/signal_handler.cc @@ -27,8 +27,8 @@ class SignalListener : public base::MessagePumpLibevent::Watcher { void AddSignalHandler(int signal, const SignalHandler& handler); - virtual void OnFileCanReadWithoutBlocking(int fd) override; - virtual void OnFileCanWriteWithoutBlocking(int fd) override {} + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override {} // WatchFileDescriptor needs a controller through which the operation can be // canceled. We don't use it, but this is as good a place as any to store it. diff --git a/remoting/host/register_support_host_request.h b/remoting/host/register_support_host_request.h index afc4643..00c1d71 100644 --- a/remoting/host/register_support_host_request.h +++ b/remoting/host/register_support_host_request.h @@ -50,13 +50,11 @@ class RegisterSupportHostRequest : public SignalStrategy::Listener { scoped_refptr<RsaKeyPair> key_pair, const std::string& directory_bot_jid, const RegisterCallback& callback); - virtual ~RegisterSupportHostRequest(); + ~RegisterSupportHostRequest() override; // HostStatusObserver implementation. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; private: void DoSend(); diff --git a/remoting/host/remote_input_filter.h b/remoting/host/remote_input_filter.h index 35e92d0..1d2301c 100644 --- a/remoting/host/remote_input_filter.h +++ b/remoting/host/remote_input_filter.h @@ -22,7 +22,7 @@ class RemoteInputFilter : public protocol::InputStub { // Creates a filter forwarding events to the specified InputEventTracker. // The filter needs a tracker to release buttons & keys when blocking input. explicit RemoteInputFilter(protocol::InputEventTracker* event_tracker); - virtual ~RemoteInputFilter(); + ~RemoteInputFilter() override; // Informs the filter that local mouse activity has been detected. If the // activity does not match events we injected then we assume that it is local, @@ -33,9 +33,9 @@ class RemoteInputFilter : public protocol::InputStub { void SetExpectLocalEcho(bool expect_local_echo); // InputStub overrides. - virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; - virtual void InjectTextEvent(const protocol::TextEvent& event) override; - virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; + void InjectKeyEvent(const protocol::KeyEvent& event) override; + void InjectTextEvent(const protocol::TextEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; private: bool ShouldIgnoreInput() const; diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 6aa6b1e2..444d5ab 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -152,19 +152,19 @@ class HostProcess int* exit_code_out); // ConfigWatcher::Delegate interface. - virtual void OnConfigUpdated(const std::string& serialized_config) override; - virtual void OnConfigWatcherError() override; + void OnConfigUpdated(const std::string& serialized_config) override; + void OnConfigWatcherError() override; // IPC::Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& message) override; - virtual void OnChannelError() override; + bool OnMessageReceived(const IPC::Message& message) override; + void OnChannelError() override; // HeartbeatSender::Listener overrides. - virtual void OnHeartbeatSuccessful() override; - virtual void OnUnknownHostIdError() override; + void OnHeartbeatSuccessful() override; + void OnUnknownHostIdError() override; // HostChangeNotificationListener::Listener overrides. - virtual void OnHostDeleted() override; + void OnHostDeleted() override; // Initializes the pairing registry on Windows. void OnInitializePairingRegistry( @@ -204,7 +204,7 @@ class HostProcess }; friend class base::RefCountedThreadSafe<HostProcess>; - virtual ~HostProcess(); + ~HostProcess() override; void StartOnNetworkThread(); diff --git a/remoting/host/resizing_host_observer.h b/remoting/host/resizing_host_observer.h index bcd36a1..723b416 100644 --- a/remoting/host/resizing_host_observer.h +++ b/remoting/host/resizing_host_observer.h @@ -28,10 +28,10 @@ class DesktopResizer; class ResizingHostObserver : public ScreenControls { public: explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer); - virtual ~ResizingHostObserver(); + ~ResizingHostObserver() override; // ScreenControls interface. - virtual void SetScreenResolution(const ScreenResolution& resolution) override; + void SetScreenResolution(const ScreenResolution& resolution) override; // Provide a replacement for base::Time::Now so that this class can be // unit-tested in a timely manner. This function will be called exactly diff --git a/remoting/host/resizing_host_observer_unittest.cc b/remoting/host/resizing_host_observer_unittest.cc index aefb390..9941a1b 100644 --- a/remoting/host/resizing_host_observer_unittest.cc +++ b/remoting/host/resizing_host_observer_unittest.cc @@ -51,17 +51,17 @@ class FakeDesktopResizer : public DesktopResizer { } } - virtual ~FakeDesktopResizer() { + ~FakeDesktopResizer() override { EXPECT_EQ(initial_resolution_, GetCurrentResolution()); } int set_resolution_call_count() { return set_resolution_call_count_; } // remoting::DesktopResizer interface - virtual ScreenResolution GetCurrentResolution() override { + ScreenResolution GetCurrentResolution() override { return current_resolution_; } - virtual std::list<ScreenResolution> GetSupportedResolutions( + std::list<ScreenResolution> GetSupportedResolutions( const ScreenResolution& preferred) override { std::list<ScreenResolution> result = supported_resolutions_; if (exact_size_supported_) { @@ -69,11 +69,11 @@ class FakeDesktopResizer : public DesktopResizer { } return result; } - virtual void SetResolution(const ScreenResolution& resolution) override { + void SetResolution(const ScreenResolution& resolution) override { current_resolution_ = resolution; ++set_resolution_call_count_; } - virtual void RestoreResolution(const ScreenResolution& resolution) override { + void RestoreResolution(const ScreenResolution& resolution) override { current_resolution_ = resolution; if (restore_resolution_call_count_) ++(*restore_resolution_call_count_); diff --git a/remoting/host/setup/daemon_controller_delegate_mac.h b/remoting/host/setup/daemon_controller_delegate_mac.h index 8a881d9..ec69d32 100644 --- a/remoting/host/setup/daemon_controller_delegate_mac.h +++ b/remoting/host/setup/daemon_controller_delegate_mac.h @@ -14,24 +14,22 @@ namespace remoting { class DaemonControllerDelegateMac : public DaemonController::Delegate { public: DaemonControllerDelegateMac(); - virtual ~DaemonControllerDelegateMac(); + ~DaemonControllerDelegateMac() override; // DaemonController::Delegate interface. - virtual DaemonController::State GetState() override; - virtual scoped_ptr<base::DictionaryValue> GetConfig() override; - virtual void InstallHost( - const DaemonController::CompletionCallback& done) override; - virtual void SetConfigAndStart( + DaemonController::State GetState() override; + scoped_ptr<base::DictionaryValue> GetConfig() override; + void InstallHost(const DaemonController::CompletionCallback& done) override; + void SetConfigAndStart( scoped_ptr<base::DictionaryValue> config, bool consent, const DaemonController::CompletionCallback& done) override; - virtual void UpdateConfig( - scoped_ptr<base::DictionaryValue> config, - const DaemonController::CompletionCallback& done) override; - virtual void Stop(const DaemonController::CompletionCallback& done) override; - virtual void SetWindow(void* window_handle) override; - virtual std::string GetVersion() override; - virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() override; + void UpdateConfig(scoped_ptr<base::DictionaryValue> config, + const DaemonController::CompletionCallback& done) override; + void Stop(const DaemonController::CompletionCallback& done) override; + void SetWindow(void* window_handle) override; + std::string GetVersion() override; + DaemonController::UsageStatsConsent GetUsageStatsConsent() override; private: void ShowPreferencePane(const std::string& config_data, diff --git a/remoting/host/setup/host_starter.h b/remoting/host/setup/host_starter.h index d990509..5c03284 100644 --- a/remoting/host/setup/host_starter.h +++ b/remoting/host/setup/host_starter.h @@ -34,7 +34,7 @@ class HostStarter : public gaia::GaiaOAuthClient::Delegate, typedef base::Callback<void(Result)> CompletionCallback; - virtual ~HostStarter(); + ~HostStarter() override; // Creates a HostStarter. static scoped_ptr<HostStarter> Create( @@ -52,23 +52,23 @@ class HostStarter : public gaia::GaiaOAuthClient::Delegate, CompletionCallback on_done); // gaia::GaiaOAuthClient::Delegate - virtual void OnGetTokensResponse(const std::string& refresh_token, - const std::string& access_token, - int expires_in_seconds) override; - virtual void OnRefreshTokenResponse(const std::string& access_token, - int expires_in_seconds) override; - virtual void OnGetUserEmailResponse(const std::string& user_email) override; + void OnGetTokensResponse(const std::string& refresh_token, + const std::string& access_token, + int expires_in_seconds) override; + void OnRefreshTokenResponse(const std::string& access_token, + int expires_in_seconds) override; + void OnGetUserEmailResponse(const std::string& user_email) override; // remoting::ServiceClient::Delegate - virtual void OnHostRegistered(const std::string& authorization_code) override; - virtual void OnHostUnregistered() override; + void OnHostRegistered(const std::string& authorization_code) override; + void OnHostUnregistered() override; // TODO(sergeyu): Following methods are members of all three delegate // interfaces implemented in this class. Fix ServiceClient and // GaiaUserEmailFetcher so that Delegate interfaces do not overlap (ideally // they should be changed to use Callback<>). - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnOAuthError() override; + void OnNetworkError(int response_code) override; private: HostStarter(scoped_ptr<gaia::GaiaOAuthClient> oauth_client, diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h index 507e682..1886f51 100644 --- a/remoting/host/setup/me2me_native_messaging_host.h +++ b/remoting/host/setup/me2me_native_messaging_host.h @@ -44,13 +44,13 @@ class Me2MeNativeMessagingHost scoped_refptr<DaemonController> daemon_controller, scoped_refptr<protocol::PairingRegistry> pairing_registry, scoped_ptr<OAuthClient> oauth_client); - virtual ~Me2MeNativeMessagingHost(); + ~Me2MeNativeMessagingHost() override; void Start(const base::Closure& quit_closure); // extensions::NativeMessagingChannel::EventHandler implementation - virtual void OnMessage(scoped_ptr<base::Value> message) override; - virtual void OnDisconnect() override; + void OnMessage(scoped_ptr<base::Value> message) override; + void OnDisconnect() override; private: // These "Process.." methods handle specific request types. The |response| diff --git a/remoting/host/setup/me2me_native_messaging_host_unittest.cc b/remoting/host/setup/me2me_native_messaging_host_unittest.cc index 93391a3..e525799 100644 --- a/remoting/host/setup/me2me_native_messaging_host_unittest.cc +++ b/remoting/host/setup/me2me_native_messaging_host_unittest.cc @@ -135,24 +135,22 @@ namespace remoting { class MockDaemonControllerDelegate : public DaemonController::Delegate { public: MockDaemonControllerDelegate(); - virtual ~MockDaemonControllerDelegate(); + ~MockDaemonControllerDelegate() override; // DaemonController::Delegate interface. - virtual DaemonController::State GetState() override; - virtual scoped_ptr<base::DictionaryValue> GetConfig() override; - virtual void InstallHost( - const DaemonController::CompletionCallback& done) override; - virtual void SetConfigAndStart( + DaemonController::State GetState() override; + scoped_ptr<base::DictionaryValue> GetConfig() override; + void InstallHost(const DaemonController::CompletionCallback& done) override; + void SetConfigAndStart( scoped_ptr<base::DictionaryValue> config, bool consent, const DaemonController::CompletionCallback& done) override; - virtual void UpdateConfig( - scoped_ptr<base::DictionaryValue> config, - const DaemonController::CompletionCallback& done) override; - virtual void Stop(const DaemonController::CompletionCallback& done) override; - virtual void SetWindow(void* window_handle) override; - virtual std::string GetVersion() override; - virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() override; + void UpdateConfig(scoped_ptr<base::DictionaryValue> config, + const DaemonController::CompletionCallback& done) override; + void Stop(const DaemonController::CompletionCallback& done) override; + void SetWindow(void* window_handle) override; + std::string GetVersion() override; + DaemonController::UsageStatsConsent GetUsageStatsConsent() override; private: DISALLOW_COPY_AND_ASSIGN(MockDaemonControllerDelegate); diff --git a/remoting/host/setup/oauth_client.h b/remoting/host/setup/oauth_client.h index b704dcd..5cc8f1f 100644 --- a/remoting/host/setup/oauth_client.h +++ b/remoting/host/setup/oauth_client.h @@ -33,7 +33,7 @@ class OAuthClient : public gaia::GaiaOAuthClient::Delegate { OAuthClient( scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); - virtual ~OAuthClient(); + ~OAuthClient() override; // Redeems |auth_code| using |oauth_client_info| to obtain |refresh_token| and // |access_token|, then uses the userinfo endpoint to obtain |user_email|. @@ -47,15 +47,15 @@ class OAuthClient : public gaia::GaiaOAuthClient::Delegate { CompletionCallback on_done); // gaia::GaiaOAuthClient::Delegate - virtual void OnGetTokensResponse(const std::string& refresh_token, - const std::string& access_token, - int expires_in_seconds) override; - virtual void OnRefreshTokenResponse(const std::string& access_token, - int expires_in_seconds) override; - virtual void OnGetUserEmailResponse(const std::string& user_email) override; - - virtual void OnOAuthError() override; - virtual void OnNetworkError(int response_code) override; + void OnGetTokensResponse(const std::string& refresh_token, + const std::string& access_token, + int expires_in_seconds) override; + void OnRefreshTokenResponse(const std::string& access_token, + int expires_in_seconds) override; + void OnGetUserEmailResponse(const std::string& user_email) override; + + void OnOAuthError() override; + void OnNetworkError(int response_code) override; private: struct Request { diff --git a/remoting/host/setup/service_client.cc b/remoting/host/setup/service_client.cc index 7c4d4b4..32ff37f 100644 --- a/remoting/host/setup/service_client.cc +++ b/remoting/host/setup/service_client.cc @@ -40,11 +40,11 @@ class ServiceClient::Core ServiceClient::Delegate* delegate); // net::URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; private: friend class base::RefCountedThreadSafe<Core>; - virtual ~Core() {} + ~Core() override {} enum PendingRequestType { PENDING_REQUEST_NONE, diff --git a/remoting/host/shaped_desktop_capturer.h b/remoting/host/shaped_desktop_capturer.h index a9a964c..7b37ed7 100644 --- a/remoting/host/shaped_desktop_capturer.h +++ b/remoting/host/shaped_desktop_capturer.h @@ -18,16 +18,16 @@ class ShapedDesktopCapturer : public webrtc::DesktopCapturer, public: ShapedDesktopCapturer(scoped_ptr<webrtc::DesktopCapturer> screen_capturer, scoped_ptr<DesktopShapeTracker> shape_tracker); - virtual ~ShapedDesktopCapturer(); + ~ShapedDesktopCapturer() override; // webrtc::DesktopCapturer interface. - virtual void Start(webrtc::DesktopCapturer::Callback* callback) override; - virtual void Capture(const webrtc::DesktopRegion& region) override; + void Start(webrtc::DesktopCapturer::Callback* callback) override; + void Capture(const webrtc::DesktopRegion& region) override; private: // webrtc::DesktopCapturer::Callback interface. - virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override; - virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; + webrtc::SharedMemory* CreateSharedMemory(size_t size) override; + void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; scoped_ptr<webrtc::DesktopCapturer> desktop_capturer_; scoped_ptr<DesktopShapeTracker> shape_tracker_; diff --git a/remoting/host/shaped_desktop_capturer_unittest.cc b/remoting/host/shaped_desktop_capturer_unittest.cc index 3289240..dbe353e 100644 --- a/remoting/host/shaped_desktop_capturer_unittest.cc +++ b/remoting/host/shaped_desktop_capturer_unittest.cc @@ -16,7 +16,7 @@ namespace remoting { class FakeDesktopShapeTracker : public DesktopShapeTracker { public: FakeDesktopShapeTracker() {} - virtual ~FakeDesktopShapeTracker() {} + ~FakeDesktopShapeTracker() override {} static webrtc::DesktopRegion CreateShape() { webrtc::DesktopRegion result; @@ -25,11 +25,9 @@ class FakeDesktopShapeTracker : public DesktopShapeTracker { return result; } - virtual void RefreshDesktopShape() override { - shape_ = CreateShape(); - } + void RefreshDesktopShape() override { shape_ = CreateShape(); } - virtual const webrtc::DesktopRegion& desktop_shape() override { + const webrtc::DesktopRegion& desktop_shape() override { // desktop_shape() can't be called before RefreshDesktopShape(). EXPECT_FALSE(shape_.is_empty()); return shape_; @@ -43,11 +41,11 @@ class ShapedDesktopCapturerTest : public testing::Test, public webrtc::DesktopCapturer::Callback { public: // webrtc::DesktopCapturer::Callback interface - virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override { + webrtc::SharedMemory* CreateSharedMemory(size_t size) override { return NULL; } - virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override { + void OnCaptureCompleted(webrtc::DesktopFrame* frame) override { last_frame_.reset(frame); } diff --git a/remoting/host/signaling_connector.h b/remoting/host/signaling_connector.h index 4447cf4..feba6cf 100644 --- a/remoting/host/signaling_connector.h +++ b/remoting/host/signaling_connector.h @@ -35,7 +35,7 @@ class SignalingConnector XmppSignalStrategy* signal_strategy, scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker, const base::Closure& auth_failed_callback); - virtual ~SignalingConnector(); + ~SignalingConnector() override; // May be called immediately after the constructor to enable OAuth // access token updating. @@ -48,17 +48,15 @@ class SignalingConnector const std::string& access_token); // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; // NetworkChangeNotifier::ConnectionTypeObserver interface. - virtual void OnConnectionTypeChanged( + void OnConnectionTypeChanged( net::NetworkChangeNotifier::ConnectionType type) override; // NetworkChangeNotifier::IPAddressObserver interface. - virtual void OnIPAddressChanged() override; + void OnIPAddressChanged() override; private: void OnNetworkError(); diff --git a/remoting/host/single_window_desktop_environment.cc b/remoting/host/single_window_desktop_environment.cc index f764651..3b721fc 100644 --- a/remoting/host/single_window_desktop_environment.cc +++ b/remoting/host/single_window_desktop_environment.cc @@ -16,11 +16,11 @@ namespace remoting { class SingleWindowDesktopEnvironment : public BasicDesktopEnvironment { public: - virtual ~SingleWindowDesktopEnvironment(); + ~SingleWindowDesktopEnvironment() override; // DesktopEnvironment interface. - virtual scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override; - virtual scoped_ptr<InputInjector> CreateInputInjector() override; + scoped_ptr<webrtc::DesktopCapturer> CreateVideoCapturer() override; + scoped_ptr<InputInjector> CreateInputInjector() override; protected: friend class SingleWindowDesktopEnvironmentFactory; diff --git a/remoting/host/single_window_desktop_environment.h b/remoting/host/single_window_desktop_environment.h index b8e86d0..6ff683b 100644 --- a/remoting/host/single_window_desktop_environment.h +++ b/remoting/host/single_window_desktop_environment.h @@ -20,10 +20,10 @@ class SingleWindowDesktopEnvironmentFactory scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, webrtc::WindowId window_id); - virtual ~SingleWindowDesktopEnvironmentFactory(); + ~SingleWindowDesktopEnvironmentFactory() override; // DesktopEnvironmentFactory interface. - virtual scoped_ptr<DesktopEnvironment> Create( + scoped_ptr<DesktopEnvironment> Create( base::WeakPtr<ClientSessionControl> client_session_control) override; private: diff --git a/remoting/host/single_window_input_injector_mac.cc b/remoting/host/single_window_input_injector_mac.cc index fc24eac..ecc6f53 100644 --- a/remoting/host/single_window_input_injector_mac.cc +++ b/remoting/host/single_window_input_injector_mac.cc @@ -24,15 +24,14 @@ class SingleWindowInputInjectorMac : public SingleWindowInputInjector { SingleWindowInputInjectorMac( webrtc::WindowId window_id, scoped_ptr<InputInjector> input_injector); - virtual ~SingleWindowInputInjectorMac(); + ~SingleWindowInputInjectorMac() override; // InputInjector interface. - virtual void Start( - scoped_ptr<protocol::ClipboardStub> client_clipboard) override; - virtual void InjectKeyEvent(const KeyEvent& event) override; - virtual void InjectTextEvent(const TextEvent& event) override; - virtual void InjectMouseEvent(const MouseEvent& event) override; - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; + void InjectKeyEvent(const KeyEvent& event) override; + void InjectTextEvent(const TextEvent& event) override; + void InjectMouseEvent(const MouseEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; private: CGRect FindCGRectOfWindow(); diff --git a/remoting/host/token_validator_base.h b/remoting/host/token_validator_base.h index e67cb00..b5c7d20 100644 --- a/remoting/host/token_validator_base.h +++ b/remoting/host/token_validator_base.h @@ -41,22 +41,21 @@ class TokenValidatorBase const ThirdPartyAuthConfig& third_party_auth_config, const std::string& token_scope, scoped_refptr<net::URLRequestContextGetter> request_context_getter); - virtual ~TokenValidatorBase(); + ~TokenValidatorBase() override; // TokenValidator interface. - virtual void ValidateThirdPartyToken( + void ValidateThirdPartyToken( const std::string& token, - const base::Callback<void( - const std::string& shared_secret)>& on_token_validated) override; + const base::Callback<void(const std::string& shared_secret)>& + on_token_validated) override; - virtual const GURL& token_url() const override; - virtual const std::string& token_scope() const override; + const GURL& token_url() const override; + const std::string& token_scope() const override; // URLRequest::Delegate interface. - virtual void OnResponseStarted(net::URLRequest* source) override; - virtual void OnReadCompleted(net::URLRequest* source, - int bytes_read) override; - virtual void OnCertificateRequested( + void OnResponseStarted(net::URLRequest* source) override; + void OnReadCompleted(net::URLRequest* source, int bytes_read) override; + void OnCertificateRequested( net::URLRequest* source, net::SSLCertRequestInfo* cert_request_info) override; diff --git a/remoting/host/token_validator_factory_impl.cc b/remoting/host/token_validator_factory_impl.cc index c5fd3c3..3357558 100644 --- a/remoting/host/token_validator_factory_impl.cc +++ b/remoting/host/token_validator_factory_impl.cc @@ -45,7 +45,7 @@ class TokenValidatorImpl : public TokenValidatorBase { scoped_refptr<net::URLRequestContextGetter> request_context_getter); protected: - virtual void StartValidateRequest(const std::string& token) override; + void StartValidateRequest(const std::string& token) override; private: static std::string CreateScope(const std::string& local_jid, diff --git a/remoting/host/token_validator_factory_impl.h b/remoting/host/token_validator_factory_impl.h index d06bf36..025eff3 100644 --- a/remoting/host/token_validator_factory_impl.h +++ b/remoting/host/token_validator_factory_impl.h @@ -28,10 +28,10 @@ class TokenValidatorFactoryImpl : public protocol::TokenValidatorFactory { scoped_refptr<RsaKeyPair> key_pair, scoped_refptr<net::URLRequestContextGetter> request_context_getter); - virtual ~TokenValidatorFactoryImpl(); + ~TokenValidatorFactoryImpl() override; // TokenValidatorFactory interface. - virtual scoped_ptr<protocol::TokenValidator> CreateTokenValidator( + scoped_ptr<protocol::TokenValidator> CreateTokenValidator( const std::string& local_jid, const std::string& remote_jid) override; diff --git a/remoting/host/token_validator_factory_impl_unittest.cc b/remoting/host/token_validator_factory_impl_unittest.cc index 5f8ea49..e884984 100644 --- a/remoting/host/token_validator_factory_impl_unittest.cc +++ b/remoting/host/token_validator_factory_impl_unittest.cc @@ -40,9 +40,9 @@ class FakeProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { : headers_(headers), response_(response) { } - virtual net::URLRequestJob* MaybeCreateJob( - net::URLRequest* request, net::NetworkDelegate* network_delegate) const - override { + net::URLRequestJob* MaybeCreateJob( + net::URLRequest* request, + net::NetworkDelegate* network_delegate) const override { return new net::URLRequestTestJob( request, network_delegate, headers_, response_, true); } diff --git a/remoting/host/video_frame_recorder.cc b/remoting/host/video_frame_recorder.cc index 1ec900c..5abce9c 100644 --- a/remoting/host/video_frame_recorder.cc +++ b/remoting/host/video_frame_recorder.cc @@ -38,10 +38,9 @@ class VideoFrameRecorder::RecordingVideoEncoder : public VideoEncoder { } // remoting::VideoEncoder interface. - virtual void SetLosslessEncode(bool want_lossless) override; - virtual void SetLosslessColor(bool want_lossless) override; - virtual scoped_ptr<VideoPacket> Encode( - const webrtc::DesktopFrame& frame) override; + void SetLosslessEncode(bool want_lossless) override; + void SetLosslessColor(bool want_lossless) override; + scoped_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame) override; private: scoped_ptr<VideoEncoder> encoder_; diff --git a/remoting/host/video_frame_recorder_host_extension.cc b/remoting/host/video_frame_recorder_host_extension.cc index e405cef..61bd746 100644 --- a/remoting/host/video_frame_recorder_host_extension.cc +++ b/remoting/host/video_frame_recorder_host_extension.cc @@ -28,15 +28,14 @@ const char kVideoRecorderType[] = "video-recorder"; class VideoFrameRecorderHostExtensionSession : public HostExtensionSession { public: explicit VideoFrameRecorderHostExtensionSession(int64_t max_content_bytes); - virtual ~VideoFrameRecorderHostExtensionSession(); + ~VideoFrameRecorderHostExtensionSession() override; // remoting::HostExtensionSession interface. - virtual void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder) override; - virtual bool ModifiesVideoPipeline() const override; - virtual bool OnExtensionMessage( - ClientSessionControl* client_session_control, - protocol::ClientStub* client_stub, - const protocol::ExtensionMessage& message) override; + void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder) override; + bool ModifiesVideoPipeline() const override; + bool OnExtensionMessage(ClientSessionControl* client_session_control, + protocol::ClientStub* client_stub, + const protocol::ExtensionMessage& message) override; private: // Handlers for the different frame recorder extension message types. diff --git a/remoting/host/video_frame_recorder_host_extension.h b/remoting/host/video_frame_recorder_host_extension.h index ff2ff4e..f35ec02 100644 --- a/remoting/host/video_frame_recorder_host_extension.h +++ b/remoting/host/video_frame_recorder_host_extension.h @@ -16,14 +16,14 @@ namespace remoting { class VideoFrameRecorderHostExtension : public HostExtension { public: VideoFrameRecorderHostExtension(); - virtual ~VideoFrameRecorderHostExtension(); + ~VideoFrameRecorderHostExtension() override; // Sets the maximum number of bytes that each session may record. void SetMaxContentBytes(int64_t max_content_bytes); // remoting::HostExtension interface. - virtual std::string capability() const override; - virtual scoped_ptr<HostExtensionSession> CreateExtensionSession( + std::string capability() const override; + scoped_ptr<HostExtensionSession> CreateExtensionSession( ClientSessionControl* client_session, protocol::ClientStub* client_stub) override; diff --git a/remoting/host/video_scheduler.h b/remoting/host/video_scheduler.h index 795e8e2..825f07a 100644 --- a/remoting/host/video_scheduler.h +++ b/remoting/host/video_scheduler.h @@ -95,15 +95,13 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>, protocol::VideoStub* video_stub); // webrtc::DesktopCapturer::Callback implementation. - virtual webrtc::SharedMemory* CreateSharedMemory(size_t size) override; - virtual void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; + webrtc::SharedMemory* CreateSharedMemory(size_t size) override; + void OnCaptureCompleted(webrtc::DesktopFrame* frame) override; // webrtc::MouseCursorMonitor::Callback implementation. - virtual void OnMouseCursor( - webrtc::MouseCursor* mouse_cursor) override; - virtual void OnMouseCursorPosition( - webrtc::MouseCursorMonitor::CursorState state, - const webrtc::DesktopVector& position) override; + void OnMouseCursor(webrtc::MouseCursor* mouse_cursor) override; + void OnMouseCursorPosition(webrtc::MouseCursorMonitor::CursorState state, + const webrtc::DesktopVector& position) override; // Starts scheduling frame captures. void Start(); @@ -127,7 +125,7 @@ class VideoScheduler : public base::RefCountedThreadSafe<VideoScheduler>, private: friend class base::RefCountedThreadSafe<VideoScheduler>; - virtual ~VideoScheduler(); + ~VideoScheduler() override; // Capturer thread ---------------------------------------------------------- diff --git a/remoting/host/video_scheduler_unittest.cc b/remoting/host/video_scheduler_unittest.cc index 9234d67..3db994c 100644 --- a/remoting/host/video_scheduler_unittest.cc +++ b/remoting/host/video_scheduler_unittest.cc @@ -81,7 +81,7 @@ class ThreadCheckVideoEncoder : public VideoEncoderVerbatim { scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner) { } - virtual ~ThreadCheckVideoEncoder() { + ~ThreadCheckVideoEncoder() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } @@ -97,7 +97,7 @@ class ThreadCheckDesktopCapturer : public FakeDesktopCapturer { scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner) { } - virtual ~ThreadCheckDesktopCapturer() { + ~ThreadCheckDesktopCapturer() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } @@ -113,7 +113,7 @@ class ThreadCheckMouseCursorMonitor : public FakeMouseCursorMonitor { scoped_refptr<base::SingleThreadTaskRunner> task_runner) : task_runner_(task_runner) { } - virtual ~ThreadCheckMouseCursorMonitor() { + ~ThreadCheckMouseCursorMonitor() override { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); } diff --git a/remoting/protocol/audio_reader.h b/remoting/protocol/audio_reader.h index b88b066..e78392b 100644 --- a/remoting/protocol/audio_reader.h +++ b/remoting/protocol/audio_reader.h @@ -26,12 +26,12 @@ class AudioReader : public ChannelDispatcherBase { public: static scoped_ptr<AudioReader> Create(const SessionConfig& config); - virtual ~AudioReader(); + ~AudioReader() override; void set_audio_stub(AudioStub* audio_stub) { audio_stub_ = audio_stub; } protected: - virtual void OnInitialized() override; + void OnInitialized() override; private: explicit AudioReader(AudioPacket::Encoding encoding); diff --git a/remoting/protocol/audio_writer.h b/remoting/protocol/audio_writer.h index 73aa0d3..c5cac15 100644 --- a/remoting/protocol/audio_writer.h +++ b/remoting/protocol/audio_writer.h @@ -32,14 +32,14 @@ class AudioWriter : public ChannelDispatcherBase, // should be used to initialize it for the session. static scoped_ptr<AudioWriter> Create(const SessionConfig& config); - virtual ~AudioWriter(); + ~AudioWriter() override; // AudioStub interface. - virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, - const base::Closure& done) override; + void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, + const base::Closure& done) override; protected: - virtual void OnInitialized() override; + void OnInitialized() override; private: AudioWriter(); diff --git a/remoting/protocol/buffered_socket_writer.h b/remoting/protocol/buffered_socket_writer.h index d74cc82..ab8ba0d6 100644 --- a/remoting/protocol/buffered_socket_writer.h +++ b/remoting/protocol/buffered_socket_writer.h @@ -104,12 +104,12 @@ class BufferedSocketWriterBase : public base::NonThreadSafe { class BufferedSocketWriter : public BufferedSocketWriterBase { public: BufferedSocketWriter(); - virtual ~BufferedSocketWriter(); + ~BufferedSocketWriter() override; protected: - virtual void GetNextPacket(net::IOBuffer** buffer, int* size) override; - virtual base::Closure AdvanceBufferPosition(int written) override; - virtual void OnError(int result) override; + void GetNextPacket(net::IOBuffer** buffer, int* size) override; + base::Closure AdvanceBufferPosition(int written) override; + void OnError(int result) override; private: scoped_refptr<net::DrainableIOBuffer> current_buf_; @@ -118,12 +118,12 @@ class BufferedSocketWriter : public BufferedSocketWriterBase { class BufferedDatagramWriter : public BufferedSocketWriterBase { public: BufferedDatagramWriter(); - virtual ~BufferedDatagramWriter(); + ~BufferedDatagramWriter() override; protected: - virtual void GetNextPacket(net::IOBuffer** buffer, int* size) override; - virtual base::Closure AdvanceBufferPosition(int written) override; - virtual void OnError(int result) override; + void GetNextPacket(net::IOBuffer** buffer, int* size) override; + base::Closure AdvanceBufferPosition(int written) override; + void OnError(int result) override; }; } // namespace protocol diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc index 0940f76..abeb7b2 100644 --- a/remoting/protocol/channel_multiplexer.cc +++ b/remoting/protocol/channel_multiplexer.cc @@ -104,73 +104,63 @@ class ChannelMultiplexer::MuxSocket : public net::StreamSocket, public base::SupportsWeakPtr<MuxSocket> { public: MuxSocket(MuxChannel* channel); - virtual ~MuxSocket(); + ~MuxSocket() override; void OnWriteComplete(); void OnWriteFailed(); void OnPacketReceived(); // net::StreamSocket interface. - virtual int Read(net::IOBuffer* buffer, int buffer_len, - const net::CompletionCallback& callback) override; - virtual int Write(net::IOBuffer* buffer, int buffer_len, - const net::CompletionCallback& callback) override; - - virtual int SetReceiveBufferSize(int32 size) override { + int Read(net::IOBuffer* buffer, + int buffer_len, + const net::CompletionCallback& callback) override; + int Write(net::IOBuffer* buffer, + int buffer_len, + const net::CompletionCallback& callback) override; + + int SetReceiveBufferSize(int32 size) override { NOTIMPLEMENTED(); return net::ERR_NOT_IMPLEMENTED; } - virtual int SetSendBufferSize(int32 size) override { + int SetSendBufferSize(int32 size) override { NOTIMPLEMENTED(); return net::ERR_NOT_IMPLEMENTED; } - virtual int Connect(const net::CompletionCallback& callback) override { + int Connect(const net::CompletionCallback& callback) override { NOTIMPLEMENTED(); return net::ERR_NOT_IMPLEMENTED; } - virtual void Disconnect() override { - NOTIMPLEMENTED(); - } - virtual bool IsConnected() const override { + void Disconnect() override { NOTIMPLEMENTED(); } + bool IsConnected() const override { NOTIMPLEMENTED(); return true; } - virtual bool IsConnectedAndIdle() const override { + bool IsConnectedAndIdle() const override { NOTIMPLEMENTED(); return false; } - virtual int GetPeerAddress(net::IPEndPoint* address) const override { + int GetPeerAddress(net::IPEndPoint* address) const override { NOTIMPLEMENTED(); return net::ERR_NOT_IMPLEMENTED; } - virtual int GetLocalAddress(net::IPEndPoint* address) const override { + int GetLocalAddress(net::IPEndPoint* address) const override { NOTIMPLEMENTED(); return net::ERR_NOT_IMPLEMENTED; } - virtual const net::BoundNetLog& NetLog() const override { + const net::BoundNetLog& NetLog() const override { NOTIMPLEMENTED(); return net_log_; } - virtual void SetSubresourceSpeculation() override { - NOTIMPLEMENTED(); - } - virtual void SetOmniboxSpeculation() override { - NOTIMPLEMENTED(); - } - virtual bool WasEverUsed() const override { - return true; - } - virtual bool UsingTCPFastOpen() const override { - return false; - } - virtual bool WasNpnNegotiated() const override { - return false; - } - virtual net::NextProto GetNegotiatedProtocol() const override { + void SetSubresourceSpeculation() override { NOTIMPLEMENTED(); } + void SetOmniboxSpeculation() override { NOTIMPLEMENTED(); } + bool WasEverUsed() const override { return true; } + bool UsingTCPFastOpen() const override { return false; } + bool WasNpnNegotiated() const override { return false; } + net::NextProto GetNegotiatedProtocol() const override { return net::kProtoUnknown; } - virtual bool GetSSLInfo(net::SSLInfo* ssl_info) override { + bool GetSSLInfo(net::SSLInfo* ssl_info) override { NOTIMPLEMENTED(); return false; } diff --git a/remoting/protocol/channel_multiplexer.h b/remoting/protocol/channel_multiplexer.h index 99a3112..74f268e 100644 --- a/remoting/protocol/channel_multiplexer.h +++ b/remoting/protocol/channel_multiplexer.h @@ -21,12 +21,12 @@ class ChannelMultiplexer : public StreamChannelFactory { // |factory| is used to create the channel upon which to multiplex. ChannelMultiplexer(StreamChannelFactory* factory, const std::string& base_channel_name); - virtual ~ChannelMultiplexer(); + ~ChannelMultiplexer() override; // StreamChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; private: struct PendingChannel; diff --git a/remoting/protocol/chromium_port_allocator.cc b/remoting/protocol/chromium_port_allocator.cc index d42c4f6..013be85 100644 --- a/remoting/protocol/chromium_port_allocator.cc +++ b/remoting/protocol/chromium_port_allocator.cc @@ -34,14 +34,14 @@ class ChromiumPortAllocatorSession const std::vector<std::string>& relay_hosts, const std::string& relay, const scoped_refptr<net::URLRequestContextGetter>& url_context); - virtual ~ChromiumPortAllocatorSession(); + ~ChromiumPortAllocatorSession() override; // cricket::HttpPortAllocatorBase overrides. - virtual void ConfigReady(cricket::PortConfiguration* config) override; - virtual void SendSessionRequest(const std::string& host, int port) override; + void ConfigReady(cricket::PortConfiguration* config) override; + void SendSessionRequest(const std::string& host, int port) override; // net::URLFetcherDelegate interface. - virtual void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override; + void OnURLFetchComplete(const net::URLFetcher* url_fetcher) override; private: scoped_refptr<net::URLRequestContextGetter> url_context_; diff --git a/remoting/protocol/chromium_port_allocator.h b/remoting/protocol/chromium_port_allocator.h index 3f7418d..778771d 100644 --- a/remoting/protocol/chromium_port_allocator.h +++ b/remoting/protocol/chromium_port_allocator.h @@ -29,10 +29,10 @@ class ChromiumPortAllocator : public cricket::HttpPortAllocatorBase { const scoped_refptr<net::URLRequestContextGetter>& url_context, const NetworkSettings& network_settings); - virtual ~ChromiumPortAllocator(); + ~ChromiumPortAllocator() override; // cricket::HttpPortAllocatorBase overrides. - virtual cricket::PortAllocatorSession* CreateSessionInternal( + cricket::PortAllocatorSession* CreateSessionInternal( const std::string& content_name, int component, const std::string& ice_username_fragment, diff --git a/remoting/protocol/chromium_socket_factory.cc b/remoting/protocol/chromium_socket_factory.cc index ac08e1a..21ca900 100644 --- a/remoting/protocol/chromium_socket_factory.cc +++ b/remoting/protocol/chromium_socket_factory.cc @@ -33,25 +33,27 @@ const int kMaxSendBufferSize = 256 * 1024; class UdpPacketSocket : public rtc::AsyncPacketSocket { public: UdpPacketSocket(); - virtual ~UdpPacketSocket(); + ~UdpPacketSocket() override; bool Init(const rtc::SocketAddress& local_address, int min_port, int max_port); // rtc::AsyncPacketSocket interface. - virtual rtc::SocketAddress GetLocalAddress() const override; - virtual rtc::SocketAddress GetRemoteAddress() const override; - virtual int Send(const void* data, size_t data_size, - const rtc::PacketOptions& options) override; - virtual int SendTo(const void* data, size_t data_size, - const rtc::SocketAddress& address, - const rtc::PacketOptions& options) override; - virtual int Close() override; - virtual State GetState() const override; - virtual int GetOption(rtc::Socket::Option option, int* value) override; - virtual int SetOption(rtc::Socket::Option option, int value) override; - virtual int GetError() const override; - virtual void SetError(int error) override; + rtc::SocketAddress GetLocalAddress() const override; + rtc::SocketAddress GetRemoteAddress() const override; + int Send(const void* data, + size_t data_size, + const rtc::PacketOptions& options) override; + int SendTo(const void* data, + size_t data_size, + const rtc::SocketAddress& address, + const rtc::PacketOptions& options) override; + int Close() override; + State GetState() const override; + int GetOption(rtc::Socket::Option option, int* value) override; + int SetOption(rtc::Socket::Option option, int value) override; + int GetError() const override; + void SetError(int error) override; private: struct PendingPacket { diff --git a/remoting/protocol/chromium_socket_factory.h b/remoting/protocol/chromium_socket_factory.h index 2570e7b..63d9db7 100644 --- a/remoting/protocol/chromium_socket_factory.h +++ b/remoting/protocol/chromium_socket_factory.h @@ -14,22 +14,24 @@ namespace protocol { class ChromiumPacketSocketFactory : public rtc::PacketSocketFactory { public: explicit ChromiumPacketSocketFactory(); - virtual ~ChromiumPacketSocketFactory(); + ~ChromiumPacketSocketFactory() override; - virtual rtc::AsyncPacketSocket* CreateUdpSocket( + rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - int min_port, int max_port) override; - virtual rtc::AsyncPacketSocket* CreateServerTcpSocket( + int min_port, + int max_port) override; + rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, - int min_port, int max_port, + int min_port, + int max_port, int opts) override; - virtual rtc::AsyncPacketSocket* CreateClientTcpSocket( + rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, const rtc::SocketAddress& remote_address, const rtc::ProxyInfo& proxy_info, const std::string& user_agent, int opts) override; - virtual rtc::AsyncResolverInterface* CreateAsyncResolver() override; + rtc::AsyncResolverInterface* CreateAsyncResolver() override; private: DISALLOW_COPY_AND_ASSIGN(ChromiumPacketSocketFactory); diff --git a/remoting/protocol/client_control_dispatcher.h b/remoting/protocol/client_control_dispatcher.h index 8e94fc3f..e4612c0 100644 --- a/remoting/protocol/client_control_dispatcher.h +++ b/remoting/protocol/client_control_dispatcher.h @@ -28,19 +28,18 @@ class ClientControlDispatcher : public ChannelDispatcherBase, public HostStub { public: ClientControlDispatcher(); - virtual ~ClientControlDispatcher(); + ~ClientControlDispatcher() override; // ClipboardStub implementation. - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; // HostStub implementation. - virtual void NotifyClientResolution( - const ClientResolution& resolution) override; - virtual void ControlVideo(const VideoControl& video_control) override; - virtual void ControlAudio(const AudioControl& audio_control) override; - virtual void SetCapabilities(const Capabilities& capabilities) override; - virtual void RequestPairing(const PairingRequest& pairing_request) override; - virtual void DeliverClientMessage(const ExtensionMessage& message) override; + void NotifyClientResolution(const ClientResolution& resolution) override; + void ControlVideo(const VideoControl& video_control) override; + void ControlAudio(const AudioControl& audio_control) override; + void SetCapabilities(const Capabilities& capabilities) override; + void RequestPairing(const PairingRequest& pairing_request) override; + void DeliverClientMessage(const ExtensionMessage& message) override; // Sets the ClientStub that will be called for each incoming control // message. |client_stub| must outlive this object. @@ -54,7 +53,7 @@ class ClientControlDispatcher : public ChannelDispatcherBase, protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: void OnMessageReceived(scoped_ptr<ControlMessage> message, diff --git a/remoting/protocol/client_event_dispatcher.h b/remoting/protocol/client_event_dispatcher.h index 35c8ddd..ca61740 100644 --- a/remoting/protocol/client_event_dispatcher.h +++ b/remoting/protocol/client_event_dispatcher.h @@ -18,16 +18,16 @@ namespace protocol { class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub { public: ClientEventDispatcher(); - virtual ~ClientEventDispatcher(); + ~ClientEventDispatcher() override; // InputStub implementation. - virtual void InjectKeyEvent(const KeyEvent& event) override; - virtual void InjectTextEvent(const TextEvent& event) override; - virtual void InjectMouseEvent(const MouseEvent& event) override; + void InjectKeyEvent(const KeyEvent& event) override; + void InjectTextEvent(const TextEvent& event) override; + void InjectMouseEvent(const MouseEvent& event) override; protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: BufferedSocketWriter writer_; diff --git a/remoting/protocol/client_stub.h b/remoting/protocol/client_stub.h index d57f948..6db7b91 100644 --- a/remoting/protocol/client_stub.h +++ b/remoting/protocol/client_stub.h @@ -25,7 +25,7 @@ class ClientStub : public ClipboardStub, public CursorShapeStub { public: ClientStub() {} - virtual ~ClientStub() {} + ~ClientStub() override {} // Passes the set of capabilities supported by the host to the client. virtual void SetCapabilities(const Capabilities& capabilities) = 0; diff --git a/remoting/protocol/client_video_dispatcher.h b/remoting/protocol/client_video_dispatcher.h index 7fb57c6..fb726f0 100644 --- a/remoting/protocol/client_video_dispatcher.h +++ b/remoting/protocol/client_video_dispatcher.h @@ -18,11 +18,11 @@ class VideoStub; class ClientVideoDispatcher : public ChannelDispatcherBase { public: explicit ClientVideoDispatcher(VideoStub* video_stub); - virtual ~ClientVideoDispatcher(); + ~ClientVideoDispatcher() override; protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: ProtobufMessageReader<VideoPacket> reader_; diff --git a/remoting/protocol/clipboard_echo_filter.h b/remoting/protocol/clipboard_echo_filter.h index 1c9b1bf..4e20d3b 100644 --- a/remoting/protocol/clipboard_echo_filter.h +++ b/remoting/protocol/clipboard_echo_filter.h @@ -39,7 +39,7 @@ class ClipboardEchoFilter { class ClientFilter : public ClipboardStub { public: ClientFilter(ClipboardEchoFilter* filter); - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; private: ClipboardEchoFilter* filter_; @@ -48,7 +48,7 @@ class ClipboardEchoFilter { class HostFilter : public ClipboardStub { public: HostFilter(ClipboardEchoFilter* filter); - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; private: ClipboardEchoFilter* filter_; diff --git a/remoting/protocol/clipboard_filter.h b/remoting/protocol/clipboard_filter.h index 19a8d25..5457447 100644 --- a/remoting/protocol/clipboard_filter.h +++ b/remoting/protocol/clipboard_filter.h @@ -19,7 +19,7 @@ class ClipboardFilter : public ClipboardStub { public: ClipboardFilter(); explicit ClipboardFilter(ClipboardStub* clipboard_stub); - virtual ~ClipboardFilter(); + ~ClipboardFilter() override; // Set the ClipboardStub that events will be forwarded to. void set_clipboard_stub(ClipboardStub* clipboard_stub); @@ -29,7 +29,7 @@ class ClipboardFilter : public ClipboardStub { bool enabled() const { return enabled_; } // ClipboardStub interface. - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; private: ClipboardStub* clipboard_stub_; diff --git a/remoting/protocol/clipboard_thread_proxy.h b/remoting/protocol/clipboard_thread_proxy.h index ba63981..af68832 100644 --- a/remoting/protocol/clipboard_thread_proxy.h +++ b/remoting/protocol/clipboard_thread_proxy.h @@ -21,7 +21,7 @@ namespace protocol { class ClipboardThreadProxy : public ClipboardStub { public: - virtual ~ClipboardThreadProxy(); + ~ClipboardThreadProxy() override; // Constructs a proxy for |clipboard_stub| which will trampoline invocations // to |clipboard_stub_task_runner|. @@ -30,7 +30,7 @@ class ClipboardThreadProxy : public ClipboardStub { scoped_refptr<base::TaskRunner> clipboard_stub_task_runner); // ClipboardStub implementation. - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; private: // Injects a clipboard event into a stub, if the given weak pointer to the diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h index aee5e4a..cfbe35a 100644 --- a/remoting/protocol/connection_to_client.h +++ b/remoting/protocol/connection_to_client.h @@ -67,7 +67,7 @@ class ConnectionToClient : public base::NonThreadSafe, // Constructs a ConnectionToClient object for the |session|. Takes // ownership of |session|. explicit ConnectionToClient(Session* session); - virtual ~ConnectionToClient(); + ~ConnectionToClient() override; // Set |event_handler| for connection events. Must be called once when this // object is created. @@ -101,9 +101,9 @@ class ConnectionToClient : public base::NonThreadSafe, virtual InputStub* input_stub(); // Session::EventHandler interface. - virtual void OnSessionStateChange(Session::State state) override; - virtual void OnSessionRouteChange(const std::string& channel_name, - const TransportRoute& route) override; + void OnSessionStateChange(Session::State state) override; + void OnSessionRouteChange(const std::string& channel_name, + const TransportRoute& route) override; private: // Callback for channel initialization. diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h index fb7a34d..b1c3271 100644 --- a/remoting/protocol/connection_to_host.h +++ b/remoting/protocol/connection_to_host.h @@ -82,7 +82,7 @@ class ConnectionToHost : public SignalStrategy::Listener, }; ConnectionToHost(); - virtual ~ConnectionToHost(); + ~ConnectionToHost() override; // Allows to set a custom protocol configuration (e.g. for tests). Cannot be // called after Connect(). @@ -120,21 +120,19 @@ class ConnectionToHost : public SignalStrategy::Listener, virtual InputStub* input_stub(); // SignalStrategy::StatusObserver interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; // SessionManager::Listener interface. - virtual void OnSessionManagerReady() override; - virtual void OnIncomingSession( + void OnSessionManagerReady() override; + void OnIncomingSession( Session* session, SessionManager::IncomingSessionResponse* response) override; // Session::EventHandler interface. - virtual void OnSessionStateChange(Session::State state) override; - virtual void OnSessionRouteChange(const std::string& channel_name, - const TransportRoute& route) override; + void OnSessionStateChange(Session::State state) override; + void OnSessionRouteChange(const std::string& channel_name, + const TransportRoute& route) override; // MonitoredVideoStub::EventHandler interface. virtual void OnVideoChannelStatus(bool active); diff --git a/remoting/protocol/content_description.h b/remoting/protocol/content_description.h index a871858..5fa88fb 100644 --- a/remoting/protocol/content_description.h +++ b/remoting/protocol/content_description.h @@ -30,9 +30,9 @@ class ContentDescription : public cricket::ContentDescription { ContentDescription(scoped_ptr<CandidateSessionConfig> config, scoped_ptr<buzz::XmlElement> authenticator_message); - virtual ~ContentDescription(); + ~ContentDescription() override; - virtual ContentDescription* Copy() const override; + ContentDescription* Copy() const override; const CandidateSessionConfig* config() const { return candidate_config_.get(); diff --git a/remoting/protocol/fake_authenticator.h b/remoting/protocol/fake_authenticator.h index c55030c..94d002c 100644 --- a/remoting/protocol/fake_authenticator.h +++ b/remoting/protocol/fake_authenticator.h @@ -16,12 +16,11 @@ namespace protocol { class FakeChannelAuthenticator : public ChannelAuthenticator { public: FakeChannelAuthenticator(bool accept, bool async); - virtual ~FakeChannelAuthenticator(); + ~FakeChannelAuthenticator() override; // ChannelAuthenticator interface. - virtual void SecureAndAuthenticate( - scoped_ptr<net::StreamSocket> socket, - const DoneCallback& done_callback) override; + void SecureAndAuthenticate(scoped_ptr<net::StreamSocket> socket, + const DoneCallback& done_callback) override; private: void OnAuthBytesWritten(int result); @@ -58,21 +57,20 @@ class FakeAuthenticator : public Authenticator { FakeAuthenticator(Type type, int round_trips, Action action, bool async); - virtual ~FakeAuthenticator(); + ~FakeAuthenticator() override; // Set the number of messages that the authenticator needs to process before // started() returns true. Default to 0. void set_messages_till_started(int messages); // Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; protected: Type type_; @@ -94,10 +92,10 @@ class FakeHostAuthenticatorFactory : public AuthenticatorFactory { FakeHostAuthenticatorFactory( int round_trips, int messages_till_start, FakeAuthenticator::Action action, bool async); - virtual ~FakeHostAuthenticatorFactory(); + ~FakeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. - virtual scoped_ptr<Authenticator> CreateAuthenticator( + scoped_ptr<Authenticator> CreateAuthenticator( const std::string& local_jid, const std::string& remote_jid, const buzz::XmlElement* first_message) override; diff --git a/remoting/protocol/fake_datagram_socket.h b/remoting/protocol/fake_datagram_socket.h index 0d1c4f4..86369ae 100644 --- a/remoting/protocol/fake_datagram_socket.h +++ b/remoting/protocol/fake_datagram_socket.h @@ -35,7 +35,7 @@ namespace protocol { class FakeDatagramSocket : public net::Socket { public: FakeDatagramSocket(); - virtual ~FakeDatagramSocket(); + ~FakeDatagramSocket() override; const std::vector<std::string>& written_packets() const { return written_packets_; @@ -54,12 +54,14 @@ class FakeDatagramSocket : public net::Socket { base::WeakPtr<FakeDatagramSocket> GetWeakPtr(); // net::Socket implementation. - virtual int Read(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int Write(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int SetReceiveBufferSize(int32 size) override; - virtual int SetSendBufferSize(int32 size) override; + int Read(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int Write(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int SetReceiveBufferSize(int32 size) override; + int SetSendBufferSize(int32 size) override; private: int CopyReadData(net::IOBuffer* buf, int buf_len); @@ -83,7 +85,7 @@ class FakeDatagramSocket : public net::Socket { class FakeDatagramChannelFactory : public DatagramChannelFactory { public: FakeDatagramChannelFactory(); - virtual ~FakeDatagramChannelFactory(); + ~FakeDatagramChannelFactory() override; void set_asynchronous_create(bool asynchronous_create) { asynchronous_create_ = asynchronous_create; @@ -102,9 +104,9 @@ class FakeDatagramChannelFactory : public DatagramChannelFactory { FakeDatagramSocket* GetFakeChannel(const std::string& name); // DatagramChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; private: typedef std::map<std::string, base::WeakPtr<FakeDatagramSocket> > ChannelsMap; diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 5148688..2e5d5ce 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h @@ -23,7 +23,7 @@ extern const char kTestJid[]; class FakeSession : public Session { public: FakeSession(); - virtual ~FakeSession(); + ~FakeSession() override; EventHandler* event_handler() { return event_handler_; } @@ -34,15 +34,15 @@ class FakeSession : public Session { FakeStreamChannelFactory& fake_channel_factory() { return channel_factory_; } // Session interface. - virtual void SetEventHandler(EventHandler* event_handler) override; - virtual ErrorCode error() override; - virtual const std::string& jid() override; - virtual const CandidateSessionConfig* candidate_config() override; - virtual const SessionConfig& config() override; - virtual void set_config(const SessionConfig& config) override; - virtual StreamChannelFactory* GetTransportChannelFactory() override; - virtual StreamChannelFactory* GetMultiplexedChannelFactory() override; - virtual void Close() override; + void SetEventHandler(EventHandler* event_handler) override; + ErrorCode error() override; + const std::string& jid() override; + const CandidateSessionConfig* candidate_config() override; + const SessionConfig& config() override; + void set_config(const SessionConfig& config) override; + StreamChannelFactory* GetTransportChannelFactory() override; + StreamChannelFactory* GetMultiplexedChannelFactory() override; + void Close() override; public: EventHandler* event_handler_; diff --git a/remoting/protocol/fake_stream_socket.h b/remoting/protocol/fake_stream_socket.h index 1ba667a..cb17e89 100644 --- a/remoting/protocol/fake_stream_socket.h +++ b/remoting/protocol/fake_stream_socket.h @@ -34,7 +34,7 @@ namespace protocol { class FakeStreamSocket : public net::StreamSocket { public: FakeStreamSocket(); - virtual ~FakeStreamSocket(); + ~FakeStreamSocket() override; // Returns all data written to the socket. const std::string& written_data() const { return written_data_; } @@ -66,28 +66,30 @@ class FakeStreamSocket : public net::StreamSocket { base::WeakPtr<FakeStreamSocket> GetWeakPtr(); // net::Socket implementation. - virtual int Read(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int Write(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int SetReceiveBufferSize(int32 size) override; - virtual int SetSendBufferSize(int32 size) override; + int Read(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int Write(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int SetReceiveBufferSize(int32 size) override; + int SetSendBufferSize(int32 size) override; // net::StreamSocket interface. - virtual int Connect(const net::CompletionCallback& callback) override; - virtual void Disconnect() override; - virtual bool IsConnected() const override; - virtual bool IsConnectedAndIdle() const override; - virtual int GetPeerAddress(net::IPEndPoint* address) const override; - virtual int GetLocalAddress(net::IPEndPoint* address) const override; - virtual const net::BoundNetLog& NetLog() const override; - virtual void SetSubresourceSpeculation() override; - virtual void SetOmniboxSpeculation() override; - virtual bool WasEverUsed() const override; - virtual bool UsingTCPFastOpen() const override; - virtual bool WasNpnNegotiated() const override; - virtual net::NextProto GetNegotiatedProtocol() const override; - virtual bool GetSSLInfo(net::SSLInfo* ssl_info) override; + int Connect(const net::CompletionCallback& callback) override; + void Disconnect() override; + bool IsConnected() const override; + bool IsConnectedAndIdle() const override; + int GetPeerAddress(net::IPEndPoint* address) const override; + int GetLocalAddress(net::IPEndPoint* address) const override; + const net::BoundNetLog& NetLog() const override; + void SetSubresourceSpeculation() override; + void SetOmniboxSpeculation() override; + bool WasEverUsed() const override; + bool UsingTCPFastOpen() const override; + bool WasNpnNegotiated() const override; + net::NextProto GetNegotiatedProtocol() const override; + bool GetSSLInfo(net::SSLInfo* ssl_info) override; private: void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len, @@ -121,7 +123,7 @@ class FakeStreamSocket : public net::StreamSocket { class FakeStreamChannelFactory : public StreamChannelFactory { public: FakeStreamChannelFactory(); - virtual ~FakeStreamChannelFactory(); + ~FakeStreamChannelFactory() override; void set_asynchronous_create(bool asynchronous_create) { asynchronous_create_ = asynchronous_create; @@ -132,9 +134,9 @@ class FakeStreamChannelFactory : public StreamChannelFactory { FakeStreamSocket* GetFakeChannel(const std::string& name); // ChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; private: void NotifyChannelCreated(scoped_ptr<FakeStreamSocket> owned_channel, diff --git a/remoting/protocol/host_control_dispatcher.h b/remoting/protocol/host_control_dispatcher.h index f97cfcd..eab64c2 100644 --- a/remoting/protocol/host_control_dispatcher.h +++ b/remoting/protocol/host_control_dispatcher.h @@ -31,20 +31,18 @@ class HostControlDispatcher : public ChannelDispatcherBase, public ClientStub { public: HostControlDispatcher(); - virtual ~HostControlDispatcher(); + ~HostControlDispatcher() override; // ClientStub implementation. - virtual void SetCapabilities(const Capabilities& capabilities) override; - virtual void SetPairingResponse( - const PairingResponse& pairing_response) override; - virtual void DeliverHostMessage( - const ExtensionMessage& message) override; + void SetCapabilities(const Capabilities& capabilities) override; + void SetPairingResponse(const PairingResponse& pairing_response) override; + void DeliverHostMessage(const ExtensionMessage& message) override; // ClipboardStub implementation for sending clipboard data to client. - virtual void InjectClipboardEvent(const ClipboardEvent& event) override; + void InjectClipboardEvent(const ClipboardEvent& event) override; // CursorShapeStub implementation for sending cursor shape to client. - virtual void SetCursorShape(const CursorShapeInfo& cursor_shape) override; + void SetCursorShape(const CursorShapeInfo& cursor_shape) override; // Sets the ClipboardStub that will be called for each incoming clipboard // message. |clipboard_stub| must outlive this object. @@ -58,7 +56,7 @@ class HostControlDispatcher : public ChannelDispatcherBase, protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: void OnMessageReceived(scoped_ptr<ControlMessage> message, diff --git a/remoting/protocol/host_event_dispatcher.h b/remoting/protocol/host_event_dispatcher.h index d7afc39..968db88 100644 --- a/remoting/protocol/host_event_dispatcher.h +++ b/remoting/protocol/host_event_dispatcher.h @@ -21,7 +21,7 @@ class HostEventDispatcher : public ChannelDispatcherBase { typedef base::Callback<void(int64)> SequenceNumberCallback; HostEventDispatcher(); - virtual ~HostEventDispatcher(); + ~HostEventDispatcher() override; // Set InputStub that will be called for each incoming input // message. Doesn't take ownership of |input_stub|. It must outlive @@ -36,7 +36,7 @@ class HostEventDispatcher : public ChannelDispatcherBase { protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: void OnMessageReceived(scoped_ptr<EventMessage> message, diff --git a/remoting/protocol/host_video_dispatcher.h b/remoting/protocol/host_video_dispatcher.h index 9e319c2..36b9c69 100644 --- a/remoting/protocol/host_video_dispatcher.h +++ b/remoting/protocol/host_video_dispatcher.h @@ -18,15 +18,15 @@ namespace protocol { class HostVideoDispatcher : public ChannelDispatcherBase, public VideoStub { public: HostVideoDispatcher(); - virtual ~HostVideoDispatcher(); + ~HostVideoDispatcher() override; // VideoStub interface. - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, - const base::Closure& done) override; + void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, + const base::Closure& done) override; protected: // ChannelDispatcherBase overrides. - virtual void OnInitialized() override; + void OnInitialized() override; private: BufferedSocketWriter writer_; diff --git a/remoting/protocol/input_event_tracker.h b/remoting/protocol/input_event_tracker.h index 82e20e2..e167cd2 100644 --- a/remoting/protocol/input_event_tracker.h +++ b/remoting/protocol/input_event_tracker.h @@ -21,7 +21,7 @@ namespace protocol { class InputEventTracker : public InputStub { public: explicit InputEventTracker(protocol::InputStub* input_stub); - virtual ~InputEventTracker(); + ~InputEventTracker() override; // Returns true if the key with the specified USB code is currently pressed. bool IsKeyPressed(uint32 usb_keycode) const; @@ -34,9 +34,9 @@ class InputEventTracker : public InputStub { void ReleaseAll(); // InputStub interface. - virtual void InjectKeyEvent(const KeyEvent& event) override; - virtual void InjectTextEvent(const TextEvent& event) override; - virtual void InjectMouseEvent(const MouseEvent& event) override; + void InjectKeyEvent(const KeyEvent& event) override; + void InjectTextEvent(const TextEvent& event) override; + void InjectMouseEvent(const MouseEvent& event) override; private: protocol::InputStub* input_stub_; diff --git a/remoting/protocol/input_filter.h b/remoting/protocol/input_filter.h index 07be12a..1b7c211 100644 --- a/remoting/protocol/input_filter.h +++ b/remoting/protocol/input_filter.h @@ -19,7 +19,7 @@ class InputFilter : public InputStub { public: InputFilter(); explicit InputFilter(InputStub* input_stub); - virtual ~InputFilter(); + ~InputFilter() override; // Set the InputStub that events will be forwarded to. void set_input_stub(InputStub* input_stub) { @@ -35,9 +35,9 @@ class InputFilter : public InputStub { } // InputStub interface. - virtual void InjectKeyEvent(const KeyEvent& event) override; - virtual void InjectTextEvent(const TextEvent& event) override; - virtual void InjectMouseEvent(const MouseEvent& event) override; + void InjectKeyEvent(const KeyEvent& event) override; + void InjectTextEvent(const TextEvent& event) override; + void InjectMouseEvent(const MouseEvent& event) override; private: InputStub* input_stub_; diff --git a/remoting/protocol/it2me_host_authenticator_factory.h b/remoting/protocol/it2me_host_authenticator_factory.h index 14c3008..6d19434 100644 --- a/remoting/protocol/it2me_host_authenticator_factory.h +++ b/remoting/protocol/it2me_host_authenticator_factory.h @@ -27,10 +27,10 @@ class It2MeHostAuthenticatorFactory : public AuthenticatorFactory { const std::string& local_cert, scoped_refptr<RsaKeyPair> key_pair, const std::string& shared_secret); - virtual ~It2MeHostAuthenticatorFactory(); + ~It2MeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. - virtual scoped_ptr<Authenticator> CreateAuthenticator( + scoped_ptr<Authenticator> CreateAuthenticator( const std::string& local_jid, const std::string& remote_jid, const buzz::XmlElement* first_message) override; diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 8c509e6..eb30e50 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h @@ -43,32 +43,31 @@ class JingleSession : public base::NonThreadSafe, public DatagramChannelFactory, public Transport::EventHandler { public: - virtual ~JingleSession(); + ~JingleSession() override; // Session interface. - virtual void SetEventHandler(Session::EventHandler* event_handler) override; - virtual ErrorCode error() override; - virtual const std::string& jid() override; - virtual const CandidateSessionConfig* candidate_config() override; - virtual const SessionConfig& config() override; - virtual void set_config(const SessionConfig& config) override; - virtual StreamChannelFactory* GetTransportChannelFactory() override; - virtual StreamChannelFactory* GetMultiplexedChannelFactory() override; - virtual void Close() override; + void SetEventHandler(Session::EventHandler* event_handler) override; + ErrorCode error() override; + const std::string& jid() override; + const CandidateSessionConfig* candidate_config() override; + const SessionConfig& config() override; + void set_config(const SessionConfig& config) override; + StreamChannelFactory* GetTransportChannelFactory() override; + StreamChannelFactory* GetMultiplexedChannelFactory() override; + void Close() override; // DatagramChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; // Transport::EventHandler interface. - virtual void OnTransportCandidate( - Transport* transport, - const cricket::Candidate& candidate) override; - virtual void OnTransportRouteChange(Transport* transport, - const TransportRoute& route) override; - virtual void OnTransportFailed(Transport* transport) override; - virtual void OnTransportDeleted(Transport* transport) override; + void OnTransportCandidate(Transport* transport, + const cricket::Candidate& candidate) override; + void OnTransportRouteChange(Transport* transport, + const TransportRoute& route) override; + void OnTransportFailed(Transport* transport) override; + void OnTransportDeleted(Transport* transport) override; private: friend class JingleSessionManager; diff --git a/remoting/protocol/jingle_session_manager.h b/remoting/protocol/jingle_session_manager.h index 4cb8890..311bd6f 100644 --- a/remoting/protocol/jingle_session_manager.h +++ b/remoting/protocol/jingle_session_manager.h @@ -44,24 +44,22 @@ class JingleSessionManager : public SessionManager, public SignalStrategy::Listener { public: explicit JingleSessionManager(scoped_ptr<TransportFactory> transport_factory); - virtual ~JingleSessionManager(); + ~JingleSessionManager() override; // SessionManager interface. - virtual void Init(SignalStrategy* signal_strategy, - SessionManager::Listener* listener) override; - virtual scoped_ptr<Session> Connect( + void Init(SignalStrategy* signal_strategy, + SessionManager::Listener* listener) override; + scoped_ptr<Session> Connect( const std::string& host_jid, scoped_ptr<Authenticator> authenticator, scoped_ptr<CandidateSessionConfig> config) override; - virtual void Close() override; - virtual void set_authenticator_factory( + void Close() override; + void set_authenticator_factory( scoped_ptr<AuthenticatorFactory> authenticator_factory) override; // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; private: friend class JingleSession; diff --git a/remoting/protocol/libjingle_transport_factory.cc b/remoting/protocol/libjingle_transport_factory.cc index b2302f8..3b44cf7 100644 --- a/remoting/protocol/libjingle_transport_factory.cc +++ b/remoting/protocol/libjingle_transport_factory.cc @@ -39,19 +39,18 @@ class LibjingleTransport public: LibjingleTransport(cricket::PortAllocator* port_allocator, const NetworkSettings& network_settings); - virtual ~LibjingleTransport(); + ~LibjingleTransport() override; // Called by JingleTransportFactory when it has fresh Jingle info. void OnCanStart(); // Transport interface. - virtual void Connect( - const std::string& name, - Transport::EventHandler* event_handler, - const Transport::ConnectedCallback& callback) override; - virtual void AddRemoteCandidate(const cricket::Candidate& candidate) override; - virtual const std::string& name() const override; - virtual bool is_connected() const override; + void Connect(const std::string& name, + Transport::EventHandler* event_handler, + const Transport::ConnectedCallback& callback) override; + void AddRemoteCandidate(const cricket::Candidate& candidate) override; + const std::string& name() const override; + bool is_connected() const override; private: void DoStart(); diff --git a/remoting/protocol/libjingle_transport_factory.h b/remoting/protocol/libjingle_transport_factory.h index eda5b72..f6af301 100644 --- a/remoting/protocol/libjingle_transport_factory.h +++ b/remoting/protocol/libjingle_transport_factory.h @@ -43,11 +43,11 @@ class LibjingleTransportFactory : public TransportFactory { scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, const NetworkSettings& network_settings); - virtual ~LibjingleTransportFactory(); + ~LibjingleTransportFactory() override; // TransportFactory interface. - virtual void PrepareTokens() override; - virtual scoped_ptr<Transport> CreateTransport() override; + void PrepareTokens() override; + scoped_ptr<Transport> CreateTransport() override; private: void EnsureFreshJingleInfo(); diff --git a/remoting/protocol/me2me_host_authenticator_factory.cc b/remoting/protocol/me2me_host_authenticator_factory.cc index 1cd7db1..422a2bb 100644 --- a/remoting/protocol/me2me_host_authenticator_factory.cc +++ b/remoting/protocol/me2me_host_authenticator_factory.cc @@ -23,36 +23,30 @@ class RejectingAuthenticator : public Authenticator { RejectingAuthenticator() : state_(WAITING_MESSAGE) { } - virtual ~RejectingAuthenticator() { - } + ~RejectingAuthenticator() override {} - virtual State state() const override { - return state_; - } + State state() const override { return state_; } - virtual bool started() const override { - return true; - } + bool started() const override { return true; } - virtual RejectionReason rejection_reason() const override { + RejectionReason rejection_reason() const override { DCHECK_EQ(state_, REJECTED); return INVALID_CREDENTIALS; } - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override { + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override { DCHECK_EQ(state_, WAITING_MESSAGE); state_ = REJECTED; resume_callback.Run(); } - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override { + scoped_ptr<buzz::XmlElement> GetNextMessage() override { NOTREACHED(); return nullptr; } - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override { + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override { NOTREACHED(); return nullptr; } diff --git a/remoting/protocol/me2me_host_authenticator_factory.h b/remoting/protocol/me2me_host_authenticator_factory.h index bc1676d..d97b474 100644 --- a/remoting/protocol/me2me_host_authenticator_factory.h +++ b/remoting/protocol/me2me_host_authenticator_factory.h @@ -48,10 +48,10 @@ class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { static scoped_ptr<AuthenticatorFactory> CreateRejecting(); Me2MeHostAuthenticatorFactory(); - virtual ~Me2MeHostAuthenticatorFactory(); + ~Me2MeHostAuthenticatorFactory() override; // AuthenticatorFactory interface. - virtual scoped_ptr<Authenticator> CreateAuthenticator( + scoped_ptr<Authenticator> CreateAuthenticator( const std::string& local_jid, const std::string& remote_jid, const buzz::XmlElement* first_message) override; diff --git a/remoting/protocol/monitored_video_stub.h b/remoting/protocol/monitored_video_stub.h index a3675fc..33a9b90 100644 --- a/remoting/protocol/monitored_video_stub.h +++ b/remoting/protocol/monitored_video_stub.h @@ -37,11 +37,11 @@ class MonitoredVideoStub : public VideoStub { VideoStub* video_stub, base::TimeDelta connectivity_check_delay, const ChannelStateCallback& callback); - virtual ~MonitoredVideoStub(); + ~MonitoredVideoStub() override; // VideoStub implementation. - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, - const base::Closure& done) override; + void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, + const base::Closure& done) override; private: void OnConnectivityCheckTimeout(); diff --git a/remoting/protocol/mouse_input_filter.h b/remoting/protocol/mouse_input_filter.h index 3fc6d9c..334474a 100644 --- a/remoting/protocol/mouse_input_filter.h +++ b/remoting/protocol/mouse_input_filter.h @@ -19,7 +19,7 @@ class MouseInputFilter : public InputFilter { public: MouseInputFilter(); explicit MouseInputFilter(InputStub* input_stub); - virtual ~MouseInputFilter(); + ~MouseInputFilter() override; // Specify the input dimensions for mouse events. void set_input_size(const webrtc::DesktopSize& size); @@ -28,7 +28,7 @@ class MouseInputFilter : public InputFilter { void set_output_size(const webrtc::DesktopSize& size); // InputStub overrides. - virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; + void InjectMouseEvent(const protocol::MouseEvent& event) override; private: webrtc::DesktopSize input_max_; diff --git a/remoting/protocol/negotiating_authenticator_base.h b/remoting/protocol/negotiating_authenticator_base.h index e213a2d..9357d20 100644 --- a/remoting/protocol/negotiating_authenticator_base.h +++ b/remoting/protocol/negotiating_authenticator_base.h @@ -60,14 +60,13 @@ namespace protocol { // mix of webapp, client plugin and host, for both Me2Me and IT2Me. class NegotiatingAuthenticatorBase : public Authenticator { public: - virtual ~NegotiatingAuthenticatorBase(); + ~NegotiatingAuthenticatorBase() override; // Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; // Calls |current_authenticator_| to process |message|, passing the supplied // |resume_callback|. diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h index c110a85..699f4d3 100644 --- a/remoting/protocol/negotiating_client_authenticator.h +++ b/remoting/protocol/negotiating_client_authenticator.h @@ -32,12 +32,12 @@ class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase { scoped_ptr<ThirdPartyClientAuthenticator::TokenFetcher> token_fetcher_, const std::vector<AuthenticationMethod>& methods); - virtual ~NegotiatingClientAuthenticator(); + ~NegotiatingClientAuthenticator() override; // Overriden from Authenticator. - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; private: // (Asynchronously) creates an authenticator, and stores it in diff --git a/remoting/protocol/negotiating_host_authenticator.h b/remoting/protocol/negotiating_host_authenticator.h index 8a8217c..411cdb1 100644 --- a/remoting/protocol/negotiating_host_authenticator.h +++ b/remoting/protocol/negotiating_host_authenticator.h @@ -27,7 +27,7 @@ namespace protocol { // See comments in negotiating_authenticator_base.h for a general explanation. class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase { public: - virtual ~NegotiatingHostAuthenticator(); + ~NegotiatingHostAuthenticator() override; // Creates a host authenticator, using a fixed shared secret/PIN hash. // If |pairing_registry| is non-NULL then the Spake2Pair method will @@ -46,9 +46,9 @@ class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase { scoped_ptr<TokenValidator> token_validator); // Overriden from Authenticator. - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; private: NegotiatingHostAuthenticator( diff --git a/remoting/protocol/pairing_authenticator_base.h b/remoting/protocol/pairing_authenticator_base.h index 6000c45..0d5ac6f 100644 --- a/remoting/protocol/pairing_authenticator_base.h +++ b/remoting/protocol/pairing_authenticator_base.h @@ -39,17 +39,16 @@ namespace protocol { class PairingAuthenticatorBase : public Authenticator { public: PairingAuthenticatorBase(); - virtual ~PairingAuthenticatorBase(); + ~PairingAuthenticatorBase() override; // Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; protected: typedef base::Callback<void(scoped_ptr<Authenticator> authenticator)> diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h index 5b0cf5d..1696073 100644 --- a/remoting/protocol/pairing_client_authenticator.h +++ b/remoting/protocol/pairing_client_authenticator.h @@ -18,14 +18,14 @@ class PairingClientAuthenticator : public PairingAuthenticatorBase { const std::string& paired_secret, const FetchSecretCallback& fetch_pin_callback, const std::string& authentication_tag); - virtual ~PairingClientAuthenticator(); + ~PairingClientAuthenticator() override; private: // PairingAuthenticatorBase interface. - virtual void CreateV2AuthenticatorWithPIN( + void CreateV2AuthenticatorWithPIN( State initial_state, const SetAuthenticatorCallback& callback) override; - virtual void AddPairingElements(buzz::XmlElement* message) override; + void AddPairingElements(buzz::XmlElement* message) override; void OnPinFetched(State initial_state, const SetAuthenticatorCallback& callback, diff --git a/remoting/protocol/pairing_host_authenticator.h b/remoting/protocol/pairing_host_authenticator.h index 619b900..164bcd2 100644 --- a/remoting/protocol/pairing_host_authenticator.h +++ b/remoting/protocol/pairing_host_authenticator.h @@ -24,20 +24,20 @@ class PairingHostAuthenticator : public PairingAuthenticatorBase { const std::string& local_cert, scoped_refptr<RsaKeyPair> key_pair, const std::string& pin); - virtual ~PairingHostAuthenticator(); + ~PairingHostAuthenticator() override; // Authenticator interface. - virtual State state() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; + State state() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; private: // PairingAuthenticatorBase interface. - virtual void CreateV2AuthenticatorWithPIN( + void CreateV2AuthenticatorWithPIN( State initial_state, const SetAuthenticatorCallback& callback) override; - virtual void AddPairingElements(buzz::XmlElement* message) override; + void AddPairingElements(buzz::XmlElement* message) override; // Continue processing a protocol message once the pairing information for // the client id has been received. diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h index 1b3f7c9..28bfe23 100644 --- a/remoting/protocol/protocol_mock_objects.h +++ b/remoting/protocol/protocol_mock_objects.h @@ -218,15 +218,15 @@ class MockSessionManager : public SessionManager { class MockPairingRegistryDelegate : public PairingRegistry::Delegate { public: MockPairingRegistryDelegate(); - virtual ~MockPairingRegistryDelegate(); + ~MockPairingRegistryDelegate() override; // PairingRegistry::Delegate implementation. - virtual scoped_ptr<base::ListValue> LoadAll() override; - virtual bool DeleteAll() override; - virtual protocol::PairingRegistry::Pairing Load( + scoped_ptr<base::ListValue> LoadAll() override; + bool DeleteAll() override; + protocol::PairingRegistry::Pairing Load( const std::string& client_id) override; - virtual bool Save(const protocol::PairingRegistry::Pairing& pairing) override; - virtual bool Delete(const std::string& client_id) override; + bool Save(const protocol::PairingRegistry::Pairing& pairing) override; + bool Delete(const std::string& client_id) override; private: typedef std::map<std::string, protocol::PairingRegistry::Pairing> Pairings; @@ -238,13 +238,12 @@ class SynchronousPairingRegistry : public PairingRegistry { explicit SynchronousPairingRegistry(scoped_ptr<Delegate> delegate); protected: - virtual ~SynchronousPairingRegistry(); + ~SynchronousPairingRegistry() override; // Runs tasks synchronously instead of posting them to |task_runner|. - virtual void PostTask( - const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, - const tracked_objects::Location& from_here, - const base::Closure& task) override; + void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, + const tracked_objects::Location& from_here, + const base::Closure& task) override; }; } // namespace protocol diff --git a/remoting/protocol/pseudotcp_channel_factory.h b/remoting/protocol/pseudotcp_channel_factory.h index d79437c..8845940 100644 --- a/remoting/protocol/pseudotcp_channel_factory.h +++ b/remoting/protocol/pseudotcp_channel_factory.h @@ -22,12 +22,12 @@ class PseudoTcpChannelFactory : public StreamChannelFactory { // |datagram_channel_factory| must outlive this object. explicit PseudoTcpChannelFactory( DatagramChannelFactory* datagram_channel_factory); - virtual ~PseudoTcpChannelFactory(); + ~PseudoTcpChannelFactory() override; // StreamChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; private: typedef std::map<std::string, net::StreamSocket*> PendingSocketsMap; diff --git a/remoting/protocol/secure_channel_factory.h b/remoting/protocol/secure_channel_factory.h index f10ef6f..bb0a349 100644 --- a/remoting/protocol/secure_channel_factory.h +++ b/remoting/protocol/secure_channel_factory.h @@ -27,12 +27,12 @@ class SecureChannelFactory : public StreamChannelFactory { // Both parameters must outlive the object. SecureChannelFactory(StreamChannelFactory* channel_factory, Authenticator* authenticator); - virtual ~SecureChannelFactory(); + ~SecureChannelFactory() override; // StreamChannelFactory interface. - virtual void CreateChannel(const std::string& name, - const ChannelCreatedCallback& callback) override; - virtual void CancelChannelCreation(const std::string& name) override; + void CreateChannel(const std::string& name, + const ChannelCreatedCallback& callback) override; + void CancelChannelCreation(const std::string& name) override; private: typedef std::map<std::string, ChannelAuthenticator*> AuthenticatorMap; diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.h b/remoting/protocol/ssl_hmac_channel_authenticator.h index e169076..ece68fd 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.h +++ b/remoting/protocol/ssl_hmac_channel_authenticator.h @@ -53,12 +53,11 @@ class SslHmacChannelAuthenticator : public ChannelAuthenticator, scoped_refptr<RsaKeyPair> key_pair, const std::string& auth_key); - virtual ~SslHmacChannelAuthenticator(); + ~SslHmacChannelAuthenticator() override; // ChannelAuthenticator interface. - virtual void SecureAndAuthenticate( - scoped_ptr<net::StreamSocket> socket, - const DoneCallback& done_callback) override; + void SecureAndAuthenticate(scoped_ptr<net::StreamSocket> socket, + const DoneCallback& done_callback) override; private: SslHmacChannelAuthenticator(const std::string& auth_key); diff --git a/remoting/protocol/third_party_authenticator_base.h b/remoting/protocol/third_party_authenticator_base.h index de1898e..50b12e9 100644 --- a/remoting/protocol/third_party_authenticator_base.h +++ b/remoting/protocol/third_party_authenticator_base.h @@ -32,17 +32,16 @@ namespace protocol { // an authentication key, which is used to establish the connection. class ThirdPartyAuthenticatorBase : public Authenticator { public: - virtual ~ThirdPartyAuthenticatorBase(); + ~ThirdPartyAuthenticatorBase() override; // Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; protected: // XML tag names for third party authentication fields. diff --git a/remoting/protocol/third_party_authenticator_unittest.cc b/remoting/protocol/third_party_authenticator_unittest.cc index 9da75d3..f14484f 100644 --- a/remoting/protocol/third_party_authenticator_unittest.cc +++ b/remoting/protocol/third_party_authenticator_unittest.cc @@ -40,7 +40,7 @@ namespace protocol { class ThirdPartyAuthenticatorTest : public AuthenticatorTestBase { class FakeTokenFetcher : public ThirdPartyClientAuthenticator::TokenFetcher { public: - virtual void FetchThirdPartyToken( + void FetchThirdPartyToken( const GURL& token_url, const std::string& scope, const TokenFetchedCallback& token_fetched_callback) override { @@ -68,9 +68,9 @@ class ThirdPartyAuthenticatorTest : public AuthenticatorTestBase { : token_url_(kTokenUrl), token_scope_(kTokenScope) {} - virtual ~FakeTokenValidator() {} + ~FakeTokenValidator() override {} - virtual void ValidateThirdPartyToken( + void ValidateThirdPartyToken( const std::string& token, const TokenValidatedCallback& token_validated_callback) override { ASSERT_FALSE(token_validated_callback.is_null()); @@ -84,13 +84,9 @@ class ThirdPartyAuthenticatorTest : public AuthenticatorTestBase { on_token_validated.Run(shared_secret); } - virtual const GURL& token_url() const override { - return token_url_; - } + const GURL& token_url() const override { return token_url_; } - virtual const std::string& token_scope() const override { - return token_scope_; - } + const std::string& token_scope() const override { return token_scope_; } private: GURL token_url_; diff --git a/remoting/protocol/third_party_client_authenticator.h b/remoting/protocol/third_party_client_authenticator.h index ac0bd95..53dcde8 100644 --- a/remoting/protocol/third_party_client_authenticator.h +++ b/remoting/protocol/third_party_client_authenticator.h @@ -58,14 +58,13 @@ class ThirdPartyClientAuthenticator : public ThirdPartyAuthenticatorBase { // |host_public_key|. |token_fetcher| is used to get the authentication token. explicit ThirdPartyClientAuthenticator( scoped_ptr<TokenFetcher> token_fetcher); - virtual ~ThirdPartyClientAuthenticator(); + ~ThirdPartyClientAuthenticator() override; protected: // ThirdPartyAuthenticator implementation. - virtual void ProcessTokenMessage( - const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual void AddTokenElements(buzz::XmlElement* message) override; + void ProcessTokenMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + void AddTokenElements(buzz::XmlElement* message) override; private: void OnThirdPartyTokenFetched(const base::Closure& resume_callback, diff --git a/remoting/protocol/third_party_host_authenticator.h b/remoting/protocol/third_party_host_authenticator.h index 0ebc592..ad68309 100644 --- a/remoting/protocol/third_party_host_authenticator.h +++ b/remoting/protocol/third_party_host_authenticator.h @@ -35,14 +35,13 @@ class ThirdPartyHostAuthenticator : public ThirdPartyAuthenticatorBase { ThirdPartyHostAuthenticator(const std::string& local_cert, scoped_refptr<RsaKeyPair> key_pair, scoped_ptr<TokenValidator> token_validator); - virtual ~ThirdPartyHostAuthenticator(); + ~ThirdPartyHostAuthenticator() override; protected: // ThirdPartyAuthenticator implementation. - virtual void ProcessTokenMessage( - const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual void AddTokenElements(buzz::XmlElement* message) override; + void ProcessTokenMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + void AddTokenElements(buzz::XmlElement* message) override; private: void OnThirdPartyTokenValidated(const buzz::XmlElement* message, diff --git a/remoting/protocol/v2_authenticator.h b/remoting/protocol/v2_authenticator.h index 6ba3373..4e6f448 100644 --- a/remoting/protocol/v2_authenticator.h +++ b/remoting/protocol/v2_authenticator.h @@ -34,17 +34,16 @@ class V2Authenticator : public Authenticator { const std::string& shared_secret, State initial_state); - virtual ~V2Authenticator(); + ~V2Authenticator() override; // Authenticator interface. - virtual State state() const override; - virtual bool started() const override; - virtual RejectionReason rejection_reason() const override; - virtual void ProcessMessage(const buzz::XmlElement* message, - const base::Closure& resume_callback) override; - virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; - virtual scoped_ptr<ChannelAuthenticator> - CreateChannelAuthenticator() const override; + State state() const override; + bool started() const override; + RejectionReason rejection_reason() const override; + void ProcessMessage(const buzz::XmlElement* message, + const base::Closure& resume_callback) override; + scoped_ptr<buzz::XmlElement> GetNextMessage() override; + scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; private: FRIEND_TEST_ALL_PREFIXES(V2AuthenticatorTest, InvalidSecret); diff --git a/remoting/signaling/fake_signal_strategy.h b/remoting/signaling/fake_signal_strategy.h index bd316ff..7a599dc 100644 --- a/remoting/signaling/fake_signal_strategy.h +++ b/remoting/signaling/fake_signal_strategy.h @@ -29,7 +29,7 @@ class FakeSignalStrategy : public SignalStrategy, static void Connect(FakeSignalStrategy* peer1, FakeSignalStrategy* peer2); FakeSignalStrategy(const std::string& jid); - virtual ~FakeSignalStrategy(); + ~FakeSignalStrategy() override; const std::list<buzz::XmlElement*>& received_messages() { return received_messages_; @@ -39,15 +39,15 @@ class FakeSignalStrategy : public SignalStrategy, void ConnectTo(FakeSignalStrategy* peer); // SignalStrategy interface. - virtual void Connect() override; - virtual void Disconnect() override; - virtual State GetState() const override; - virtual Error GetError() const override; - virtual std::string GetLocalJid() const override; - virtual void AddListener(Listener* listener) override; - virtual void RemoveListener(Listener* listener) override; - virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; - virtual std::string GetNextId() override; + void Connect() override; + void Disconnect() override; + State GetState() const override; + Error GetError() const override; + std::string GetLocalJid() const override; + void AddListener(Listener* listener) override; + void RemoveListener(Listener* listener) override; + bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; + std::string GetNextId() override; private: typedef base::Callback<void(scoped_ptr<buzz::XmlElement> message)> diff --git a/remoting/signaling/iq_sender.h b/remoting/signaling/iq_sender.h index 51879d4..02744ed 100644 --- a/remoting/signaling/iq_sender.h +++ b/remoting/signaling/iq_sender.h @@ -38,7 +38,7 @@ class IqSender : public SignalStrategy::Listener { const buzz::XmlElement* response)> ReplyCallback; explicit IqSender(SignalStrategy* signal_strategy); - virtual ~IqSender(); + ~IqSender() override; // Send an iq stanza. Returns an IqRequest object that represends // the request. |callback| is called when response to |stanza| is @@ -55,10 +55,8 @@ class IqSender : public SignalStrategy::Listener { const ReplyCallback& callback); // SignalStrategy::Listener implementation. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; private: typedef std::map<std::string, IqRequest*> IqRequestMap; diff --git a/remoting/signaling/log_to_server.h b/remoting/signaling/log_to_server.h index b1647925..fd03235 100644 --- a/remoting/signaling/log_to_server.h +++ b/remoting/signaling/log_to_server.h @@ -30,13 +30,11 @@ class LogToServer : public base::NonThreadSafe, LogToServer(ServerLogEntry::Mode mode, SignalStrategy* signal_strategy, const std::string& directory_bot_jid); - virtual ~LogToServer(); + ~LogToServer() override; // SignalStrategy::Listener interface. - virtual void OnSignalStrategyStateChange( - SignalStrategy::State state) override; - virtual bool OnSignalStrategyIncomingStanza( - const buzz::XmlElement* stanza) override; + void OnSignalStrategyStateChange(SignalStrategy::State state) override; + bool OnSignalStrategyIncomingStanza(const buzz::XmlElement* stanza) override; void Log(const ServerLogEntry& entry); diff --git a/remoting/signaling/xmpp_signal_strategy.h b/remoting/signaling/xmpp_signal_strategy.h index 05eb079..2f378bf 100644 --- a/remoting/signaling/xmpp_signal_strategy.h +++ b/remoting/signaling/xmpp_signal_strategy.h @@ -57,21 +57,21 @@ class XmppSignalStrategy : public base::NonThreadSafe, net::ClientSocketFactory* socket_factory, scoped_refptr<net::URLRequestContextGetter> request_context_getter, const XmppServerConfig& xmpp_server_config); - virtual ~XmppSignalStrategy(); + ~XmppSignalStrategy() override; // SignalStrategy interface. - virtual void Connect() override; - virtual void Disconnect() override; - virtual State GetState() const override; - virtual Error GetError() const override; - virtual std::string GetLocalJid() const override; - virtual void AddListener(Listener* listener) override; - virtual void RemoveListener(Listener* listener) override; - virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; - virtual std::string GetNextId() override; + void Connect() override; + void Disconnect() override; + State GetState() const override; + Error GetError() const override; + std::string GetLocalJid() const override; + void AddListener(Listener* listener) override; + void RemoveListener(Listener* listener) override; + bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; + std::string GetNextId() override; // buzz::XmppStanzaHandler interface. - virtual bool HandleStanza(const buzz::XmlElement* stanza) override; + bool HandleStanza(const buzz::XmlElement* stanza) override; // This method is used to update the auth info (for example when the OAuth // access token is renewed). It is OK to call this even when we are in the diff --git a/remoting/test/fake_network_manager.h b/remoting/test/fake_network_manager.h index 0dea2ba..59a8029 100644 --- a/remoting/test/fake_network_manager.h +++ b/remoting/test/fake_network_manager.h @@ -16,12 +16,12 @@ namespace remoting { class FakeNetworkManager : public rtc::NetworkManager { public: FakeNetworkManager(const rtc::IPAddress& address); - virtual ~FakeNetworkManager(); + ~FakeNetworkManager() override; // rtc::NetworkManager interface. - virtual void StartUpdating() override; - virtual void StopUpdating() override; - virtual void GetNetworks(NetworkList* networks) const override; + void StartUpdating() override; + void StopUpdating() override; + void GetNetworks(NetworkList* networks) const override; protected: void SendNetworksChangedSignal(); diff --git a/remoting/test/fake_port_allocator.cc b/remoting/test/fake_port_allocator.cc index 45d8f19..cabd67b 100644 --- a/remoting/test/fake_port_allocator.cc +++ b/remoting/test/fake_port_allocator.cc @@ -24,11 +24,11 @@ class FakePortAllocatorSession const std::vector<rtc::SocketAddress>& stun_hosts, const std::vector<std::string>& relay_hosts, const std::string& relay); - virtual ~FakePortAllocatorSession(); + ~FakePortAllocatorSession() override; // cricket::HttpPortAllocatorBase overrides. - virtual void ConfigReady(cricket::PortConfiguration* config) override; - virtual void SendSessionRequest(const std::string& host, int port) override; + void ConfigReady(cricket::PortConfiguration* config) override; + void SendSessionRequest(const std::string& host, int port) override; private: DISALLOW_COPY_AND_ASSIGN(FakePortAllocatorSession); diff --git a/remoting/test/fake_port_allocator.h b/remoting/test/fake_port_allocator.h index ca50ae5..284dc95 100644 --- a/remoting/test/fake_port_allocator.h +++ b/remoting/test/fake_port_allocator.h @@ -21,12 +21,12 @@ class FakePortAllocator : public cricket::HttpPortAllocatorBase { static scoped_ptr<FakePortAllocator> Create( scoped_refptr<FakeNetworkDispatcher> fake_network_dispatcher); - virtual ~FakePortAllocator(); + ~FakePortAllocator() override; FakePacketSocketFactory* socket_factory() { return socket_factory_.get(); } // cricket::BasicPortAllocator overrides. - virtual cricket::PortAllocatorSession* CreateSessionInternal( + cricket::PortAllocatorSession* CreateSessionInternal( const std::string& content_name, int component, const std::string& ice_username_fragment, diff --git a/remoting/test/fake_socket_factory.cc b/remoting/test/fake_socket_factory.cc index 8bb05b5..967a770 100644 --- a/remoting/test/fake_socket_factory.cc +++ b/remoting/test/fake_socket_factory.cc @@ -39,7 +39,7 @@ class FakeUdpSocket : public rtc::AsyncPacketSocket { FakeUdpSocket(FakePacketSocketFactory* factory, scoped_refptr<FakeNetworkDispatcher> dispatcher, const rtc::SocketAddress& local_address); - virtual ~FakeUdpSocket(); + ~FakeUdpSocket() override; void ReceivePacket(const rtc::SocketAddress& from, const rtc::SocketAddress& to, @@ -47,19 +47,21 @@ class FakeUdpSocket : public rtc::AsyncPacketSocket { int data_size); // rtc::AsyncPacketSocket interface. - virtual rtc::SocketAddress GetLocalAddress() const override; - virtual rtc::SocketAddress GetRemoteAddress() const override; - virtual int Send(const void* data, size_t data_size, - const rtc::PacketOptions& options) override; - virtual int SendTo(const void* data, size_t data_size, - const rtc::SocketAddress& address, - const rtc::PacketOptions& options) override; - virtual int Close() override; - virtual State GetState() const override; - virtual int GetOption(rtc::Socket::Option option, int* value) override; - virtual int SetOption(rtc::Socket::Option option, int value) override; - virtual int GetError() const override; - virtual void SetError(int error) override; + rtc::SocketAddress GetLocalAddress() const override; + rtc::SocketAddress GetRemoteAddress() const override; + int Send(const void* data, + size_t data_size, + const rtc::PacketOptions& options) override; + int SendTo(const void* data, + size_t data_size, + const rtc::SocketAddress& address, + const rtc::PacketOptions& options) override; + int Close() override; + State GetState() const override; + int GetOption(rtc::Socket::Option option, int* value) override; + int SetOption(rtc::Socket::Option option, int value) override; + int GetError() const override; + void SetError(int error) override; private: FakePacketSocketFactory* factory_; diff --git a/remoting/test/fake_socket_factory.h b/remoting/test/fake_socket_factory.h index 02784e8..883a258a 100644 --- a/remoting/test/fake_socket_factory.h +++ b/remoting/test/fake_socket_factory.h @@ -23,7 +23,7 @@ class FakePacketSocketFactory : public rtc::PacketSocketFactory, public: // |dispatcher| must outlive the factory. explicit FakePacketSocketFactory(FakeNetworkDispatcher* dispatcher); - virtual ~FakePacketSocketFactory(); + ~FakePacketSocketFactory() override; void OnSocketDestroyed(int port); @@ -50,29 +50,30 @@ class FakePacketSocketFactory : public rtc::PacketSocketFactory, } // rtc::PacketSocketFactory interface. - virtual rtc::AsyncPacketSocket* CreateUdpSocket( + rtc::AsyncPacketSocket* CreateUdpSocket( const rtc::SocketAddress& local_address, - int min_port, int max_port) override; - virtual rtc::AsyncPacketSocket* CreateServerTcpSocket( + int min_port, + int max_port) override; + rtc::AsyncPacketSocket* CreateServerTcpSocket( const rtc::SocketAddress& local_address, - int min_port, int max_port, + int min_port, + int max_port, int opts) override; - virtual rtc::AsyncPacketSocket* CreateClientTcpSocket( + rtc::AsyncPacketSocket* CreateClientTcpSocket( const rtc::SocketAddress& local_address, const rtc::SocketAddress& remote_address, const rtc::ProxyInfo& proxy_info, const std::string& user_agent, int opts) override; - virtual rtc::AsyncResolverInterface* CreateAsyncResolver() override; + rtc::AsyncResolverInterface* CreateAsyncResolver() override; // FakeNetworkDispatcher::Node interface. - virtual const scoped_refptr<base::SingleThreadTaskRunner>& GetThread() - const override; - virtual const rtc::IPAddress& GetAddress() const override; - virtual void ReceivePacket(const rtc::SocketAddress& from, - const rtc::SocketAddress& to, - const scoped_refptr<net::IOBuffer>& data, - int data_size) override; + const scoped_refptr<base::SingleThreadTaskRunner>& GetThread() const override; + const rtc::IPAddress& GetAddress() const override; + void ReceivePacket(const rtc::SocketAddress& from, + const rtc::SocketAddress& to, + const scoped_refptr<net::IOBuffer>& data, + int data_size) override; private: struct PendingPacket { diff --git a/remoting/test/protocol_perftest.cc b/remoting/test/protocol_perftest.cc index 83d015b..86d4bec 100644 --- a/remoting/test/protocol_perftest.cc +++ b/remoting/test/protocol_perftest.cc @@ -64,11 +64,10 @@ struct NetworkPerformanceParams { class FakeCursorShapeStub : public protocol::CursorShapeStub { public: FakeCursorShapeStub() {} - virtual ~FakeCursorShapeStub() {} + ~FakeCursorShapeStub() override {} // protocol::CursorShapeStub interface. - virtual void SetCursorShape( - const protocol::CursorShapeInfo& cursor_shape) override {}; + void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override{}; }; class ProtocolPerfTest @@ -97,35 +96,31 @@ class ProtocolPerfTest } // ClientUserInterface interface. - virtual void OnConnectionState(protocol::ConnectionToHost::State state, - protocol::ErrorCode error) override { + void OnConnectionState(protocol::ConnectionToHost::State state, + protocol::ErrorCode error) override { if (state == protocol::ConnectionToHost::CONNECTED) { client_connected_ = true; if (host_connected_) connecting_loop_->Quit(); } } - virtual void OnConnectionReady(bool ready) override {} - virtual void OnRouteChanged(const std::string& channel_name, - const protocol::TransportRoute& route) override { - } - virtual void SetCapabilities(const std::string& capabilities) override {} - virtual void SetPairingResponse( + void OnConnectionReady(bool ready) override {} + void OnRouteChanged(const std::string& channel_name, + const protocol::TransportRoute& route) override {} + void SetCapabilities(const std::string& capabilities) override {} + void SetPairingResponse( const protocol::PairingResponse& pairing_response) override {} - virtual void DeliverHostMessage( - const protocol::ExtensionMessage& message) override {} - virtual protocol::ClipboardStub* GetClipboardStub() override { - return NULL; - } - virtual protocol::CursorShapeStub* GetCursorShapeStub() override { + void DeliverHostMessage(const protocol::ExtensionMessage& message) override {} + protocol::ClipboardStub* GetClipboardStub() override { return NULL; } + protocol::CursorShapeStub* GetCursorShapeStub() override { return &cursor_shape_stub_; } // VideoRenderer interface. - virtual void Initialize(const protocol::SessionConfig& config) override {} - virtual ChromotingStats* GetStats() override { return NULL; } - virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, - const base::Closure& done) override { + void Initialize(const protocol::SessionConfig& config) override {} + ChromotingStats* GetStats() override { return NULL; } + void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, + const base::Closure& done) override { if (video_packet->data().empty()) { // Ignore keep-alive packets done.Run(); @@ -141,7 +136,7 @@ class ProtocolPerfTest } // HostStatusObserver interface. - virtual void OnClientConnected(const std::string& jid) override { + void OnClientConnected(const std::string& jid) override { message_loop_.PostTask( FROM_HERE, base::Bind(&ProtocolPerfTest::OnHostConnectedMainThread, |