summaryrefslogtreecommitdiffstats
path: root/remoting/test
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 05:30:14 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 12:30:36 +0000
commit562aba59981ae3d648503827d699ae8cbbeb6111 (patch)
tree6c87081fe54abeb19222388174122272a7f4f549 /remoting/test
parentc24565478f64d1aa4d07e83c69d00bad11fa2665 (diff)
downloadchromium_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}
Diffstat (limited to 'remoting/test')
-rw-r--r--remoting/test/fake_network_manager.h8
-rw-r--r--remoting/test/fake_port_allocator.cc6
-rw-r--r--remoting/test/fake_port_allocator.h4
-rw-r--r--remoting/test/fake_socket_factory.cc30
-rw-r--r--remoting/test/fake_socket_factory.h29
-rw-r--r--remoting/test/protocol_perftest.cc39
6 files changed, 57 insertions, 59 deletions
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,