Index: net/websockets/websocket_job_test.cc |
diff --git a/net/websockets/websocket_job_test.cc b/net/websockets/websocket_job_test.cc |
index 9cf3144aa69d082732db22f1cc560d980c8cc194..3faf8093f3719568e28b9b037f2a68c9c2e729a4 100644 |
--- a/net/websockets/websocket_job_test.cc |
+++ b/net/websockets/websocket_job_test.cc |
@@ -45,27 +45,23 @@ class MockSocketStream : public SocketStream { |
URLRequestContext* context, CookieStore* cookie_store) |
: SocketStream(url, delegate, context, cookie_store) {} |
- virtual void Connect() override {} |
- virtual bool SendData(const char* data, int len) override { |
+ void Connect() override {} |
+ bool SendData(const char* data, int len) override { |
sent_data_ += std::string(data, len); |
return true; |
} |
- virtual void Close() override {} |
- virtual void RestartWithAuth( |
- const AuthCredentials& credentials) override { |
- } |
+ void Close() override {} |
+ void RestartWithAuth(const AuthCredentials& credentials) override {} |
- virtual void DetachDelegate() override { |
- delegate_ = NULL; |
- } |
+ void DetachDelegate() override { delegate_ = NULL; } |
const std::string& sent_data() const { |
return sent_data_; |
} |
protected: |
- virtual ~MockSocketStream() {} |
+ ~MockSocketStream() override {} |
private: |
std::string sent_data_; |
@@ -78,7 +74,7 @@ class MockSocketStreamDelegate : public SocketStream::Delegate { |
void set_allow_all_cookies(bool allow_all_cookies) { |
allow_all_cookies_ = allow_all_cookies; |
} |
- virtual ~MockSocketStreamDelegate() {} |
+ ~MockSocketStreamDelegate() override {} |
void SetOnStartOpenConnection(const base::Closure& callback) { |
on_start_open_connection_ = callback; |
@@ -96,42 +92,40 @@ class MockSocketStreamDelegate : public SocketStream::Delegate { |
on_close_ = callback; |
} |
- virtual int OnStartOpenConnection( |
- SocketStream* socket, |
- const CompletionCallback& callback) override { |
+ int OnStartOpenConnection(SocketStream* socket, |
+ const CompletionCallback& callback) override { |
if (!on_start_open_connection_.is_null()) |
on_start_open_connection_.Run(); |
return OK; |
} |
- virtual void OnConnected(SocketStream* socket, |
- int max_pending_send_allowed) override { |
+ void OnConnected(SocketStream* socket, |
+ int max_pending_send_allowed) override { |
if (!on_connected_.is_null()) |
on_connected_.Run(); |
} |
- virtual void OnSentData(SocketStream* socket, |
- int amount_sent) override { |
+ void OnSentData(SocketStream* socket, int amount_sent) override { |
amount_sent_ += amount_sent; |
if (!on_sent_data_.is_null()) |
on_sent_data_.Run(); |
} |
- virtual void OnReceivedData(SocketStream* socket, |
- const char* data, int len) override { |
+ void OnReceivedData(SocketStream* socket, |
+ const char* data, |
+ int len) override { |
received_data_ += std::string(data, len); |
if (!on_received_data_.is_null()) |
on_received_data_.Run(); |
} |
- virtual void OnClose(SocketStream* socket) override { |
+ void OnClose(SocketStream* socket) override { |
if (!on_close_.is_null()) |
on_close_.Run(); |
} |
- virtual bool CanGetCookies(SocketStream* socket, |
- const GURL& url) override { |
+ bool CanGetCookies(SocketStream* socket, const GURL& url) override { |
return allow_all_cookies_; |
} |
- virtual bool CanSetCookie(SocketStream* request, |
- const GURL& url, |
- const std::string& cookie_line, |
- CookieOptions* options) override { |
+ bool CanSetCookie(SocketStream* request, |
+ const GURL& url, |
+ const std::string& cookie_line, |
+ CookieOptions* options) override { |
return allow_all_cookies_; |
} |
@@ -186,44 +180,41 @@ class MockCookieStore : public CookieStore { |
} |
// CookieStore: |
- virtual void SetCookieWithOptionsAsync( |
- const GURL& url, |
- const std::string& cookie_line, |
- const CookieOptions& options, |
- const SetCookiesCallback& callback) override { |
+ void SetCookieWithOptionsAsync(const GURL& url, |
+ const std::string& cookie_line, |
+ const CookieOptions& options, |
+ const SetCookiesCallback& callback) override { |
bool result = SetCookieWithOptions(url, cookie_line, options); |
if (!callback.is_null()) |
callback.Run(result); |
} |
- virtual void GetCookiesWithOptionsAsync( |
- const GURL& url, |
- const CookieOptions& options, |
- const GetCookiesCallback& callback) override { |
+ void GetCookiesWithOptionsAsync(const GURL& url, |
+ const CookieOptions& options, |
+ const GetCookiesCallback& callback) override { |
if (!callback.is_null()) |
callback.Run(GetCookiesWithOptions(url, options)); |
} |
- virtual void GetAllCookiesForURLAsync( |
+ void GetAllCookiesForURLAsync( |
const GURL& url, |
const GetCookieListCallback& callback) override { |
ADD_FAILURE(); |
} |
- virtual void DeleteCookieAsync(const GURL& url, |
- const std::string& cookie_name, |
- const base::Closure& callback) override { |
+ void DeleteCookieAsync(const GURL& url, |
+ const std::string& cookie_name, |
+ const base::Closure& callback) override { |
ADD_FAILURE(); |
} |
- virtual void DeleteAllCreatedBetweenAsync( |
- const base::Time& delete_begin, |
- const base::Time& delete_end, |
- const DeleteCallback& callback) override { |
+ void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin, |
+ const base::Time& delete_end, |
+ const DeleteCallback& callback) override { |
ADD_FAILURE(); |
} |
- virtual void DeleteAllCreatedBetweenForHostAsync( |
+ void DeleteAllCreatedBetweenForHostAsync( |
const base::Time delete_begin, |
const base::Time delete_end, |
const GURL& url, |
@@ -231,27 +222,27 @@ class MockCookieStore : public CookieStore { |
ADD_FAILURE(); |
} |
- virtual void DeleteSessionCookiesAsync(const DeleteCallback&) override { |
+ void DeleteSessionCookiesAsync(const DeleteCallback&) override { |
ADD_FAILURE(); |
} |
- virtual CookieMonster* GetCookieMonster() override { return NULL; } |
+ CookieMonster* GetCookieMonster() override { return NULL; } |
const std::vector<Entry>& entries() const { return entries_; } |
private: |
friend class base::RefCountedThreadSafe<MockCookieStore>; |
- virtual ~MockCookieStore() {} |
+ ~MockCookieStore() override {} |
std::vector<Entry> entries_; |
}; |
class MockSSLConfigService : public SSLConfigService { |
public: |
- virtual void GetSSLConfig(SSLConfig* config) override {} |
+ void GetSSLConfig(SSLConfig* config) override {} |
protected: |
- virtual ~MockSSLConfigService() {} |
+ ~MockSSLConfigService() override {} |
}; |
class MockURLRequestContext : public URLRequestContext { |
@@ -266,9 +257,7 @@ class MockURLRequestContext : public URLRequestContext { |
include_subdomains); |
} |
- virtual ~MockURLRequestContext() { |
- AssertNoURLRequests(); |
- } |
+ ~MockURLRequestContext() override { AssertNoURLRequests(); } |
private: |
TransportSecurityState transport_security_state_; |
@@ -296,21 +285,18 @@ class MockHttpTransactionFactory : public HttpTransactionFactory { |
http_session_, spdy_session_key_, BoundNetLog()); |
} |
- virtual int CreateTransaction( |
- RequestPriority priority, |
- scoped_ptr<HttpTransaction>* trans) override { |
+ int CreateTransaction(RequestPriority priority, |
+ scoped_ptr<HttpTransaction>* trans) override { |
NOTREACHED(); |
return ERR_UNEXPECTED; |
} |
- virtual HttpCache* GetCache() override { |
+ HttpCache* GetCache() override { |
NOTREACHED(); |
return NULL; |
} |
- virtual HttpNetworkSession* GetSession() override { |
- return http_session_.get(); |
- } |
+ HttpNetworkSession* GetSession() override { return http_session_.get(); } |
private: |
OrderedSocketData* data_; |
@@ -349,35 +335,35 @@ class DeletingSocketStreamDelegate : public SocketStream::Delegate { |
// OnStartOpenConnection() is not implemented by SocketStreamDispatcherHost |
- virtual void OnConnected(SocketStream* socket, |
- int max_pending_send_allowed) override { |
+ void OnConnected(SocketStream* socket, |
+ int max_pending_send_allowed) override { |
DeleteJobMaybe(); |
} |
- virtual void OnSentData(SocketStream* socket, int amount_sent) override { |
+ void OnSentData(SocketStream* socket, int amount_sent) override { |
DeleteJobMaybe(); |
} |
- virtual void OnReceivedData(SocketStream* socket, |
- const char* data, |
- int len) override { |
+ void OnReceivedData(SocketStream* socket, |
+ const char* data, |
+ int len) override { |
DeleteJobMaybe(); |
} |
- virtual void OnClose(SocketStream* socket) override { DeleteJobMaybe(); } |
+ void OnClose(SocketStream* socket) override { DeleteJobMaybe(); } |
- virtual void OnAuthRequired(SocketStream* socket, |
- AuthChallengeInfo* auth_info) override { |
+ void OnAuthRequired(SocketStream* socket, |
+ AuthChallengeInfo* auth_info) override { |
DeleteJobMaybe(); |
} |
- virtual void OnSSLCertificateError(SocketStream* socket, |
- const SSLInfo& ssl_info, |
- bool fatal) override { |
+ void OnSSLCertificateError(SocketStream* socket, |
+ const SSLInfo& ssl_info, |
+ bool fatal) override { |
DeleteJobMaybe(); |
} |
- virtual void OnError(const SocketStream* socket, int error) override { |
+ void OnError(const SocketStream* socket, int error) override { |
DeleteJobMaybe(); |
} |