Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: net/socket/ssl_server_socket_unittest.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_server_socket_openssl.h ('k') | net/socket/ssl_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_server_socket_unittest.cc
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index 1d702580576b426719ae9859ea1b36762a488565..e9957f5e2a4ee442e9cf01c7d84c94159edcc10a 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -167,87 +167,65 @@ class FakeSocket : public StreamSocket {
outgoing_(outgoing_channel) {
}
- virtual ~FakeSocket() {
- }
+ ~FakeSocket() override {}
- virtual int Read(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Read random number of bytes.
buf_len = rand() % buf_len + 1;
return incoming_->Read(buf, buf_len, callback);
}
- virtual int Write(IOBuffer* buf, int buf_len,
- const CompletionCallback& callback) override {
+ int Write(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) override {
// Write random number of bytes.
buf_len = rand() % buf_len + 1;
return outgoing_->Write(buf, buf_len, callback);
}
- virtual int SetReceiveBufferSize(int32 size) override {
- return OK;
- }
+ int SetReceiveBufferSize(int32 size) override { return OK; }
- virtual int SetSendBufferSize(int32 size) override {
- return OK;
- }
+ int SetSendBufferSize(int32 size) override { return OK; }
- virtual int Connect(const CompletionCallback& callback) override {
- return OK;
- }
+ int Connect(const CompletionCallback& callback) override { return OK; }
- virtual void Disconnect() override {
+ void Disconnect() override {
incoming_->Close();
outgoing_->Close();
}
- virtual bool IsConnected() const override {
- return true;
- }
+ bool IsConnected() const override { return true; }
- virtual bool IsConnectedAndIdle() const override {
- return true;
- }
+ bool IsConnectedAndIdle() const override { return true; }
- virtual int GetPeerAddress(IPEndPoint* address) const override {
+ int GetPeerAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(kIPv4AddressSize);
*address = IPEndPoint(ip_address, 0 /*port*/);
return OK;
}
- virtual int GetLocalAddress(IPEndPoint* address) const override {
+ int GetLocalAddress(IPEndPoint* address) const override {
IPAddressNumber ip_address(4);
*address = IPEndPoint(ip_address, 0);
return OK;
}
- virtual const BoundNetLog& NetLog() const override {
- return net_log_;
- }
-
- virtual void SetSubresourceSpeculation() override {}
- virtual void SetOmniboxSpeculation() override {}
+ const BoundNetLog& NetLog() const override { return net_log_; }
- virtual bool WasEverUsed() const override {
- return true;
- }
+ void SetSubresourceSpeculation() override {}
+ void SetOmniboxSpeculation() override {}
- virtual bool UsingTCPFastOpen() const override {
- return false;
- }
+ bool WasEverUsed() const override { return true; }
+ bool UsingTCPFastOpen() const override { return false; }
- virtual bool WasNpnNegotiated() const override {
- return false;
- }
+ bool WasNpnNegotiated() const override { return false; }
- virtual NextProto GetNegotiatedProtocol() const override {
- return kProtoUnknown;
- }
+ NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; }
- virtual bool GetSSLInfo(SSLInfo* ssl_info) override {
- return false;
- }
+ bool GetSSLInfo(SSLInfo* ssl_info) override { return false; }
private:
BoundNetLog net_log_;
« no previous file with comments | « net/socket/ssl_server_socket_openssl.h ('k') | net/socket/ssl_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698