diff options
author | dmichael <dmichael@chromium.org> | 2014-12-18 14:30:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-18 22:32:43 +0000 |
commit | d6e570d8b4e46053505df0852e33fe5404ef07f4 (patch) | |
tree | 7cac356199e5e290278f5aab431831c89ebc1932 /net | |
parent | 7d09007efbb714fbb8da0a46a0bbb9e08b18d6ed (diff) | |
download | chromium_src-d6e570d8b4e46053505df0852e33fe5404ef07f4.zip chromium_src-d6e570d8b4e46053505df0852e33fe5404ef07f4.tar.gz chromium_src-d6e570d8b4e46053505df0852e33fe5404ef07f4.tar.bz2 |
net: Fix latent style issues
Currently, the Clang style checker ignores templates. In order to turn it on,
we first must fix latent style violations. This CL covers net/
BUG=441916
R=rsleevi@chromium.org
Review URL: https://codereview.chromium.org/787883003
Cr-Commit-Position: refs/heads/master@{#309089}
Diffstat (limited to 'net')
-rw-r--r-- | net/cookies/cookie_monster.cc | 11 | ||||
-rw-r--r-- | net/disk_cache/blockfile/storage_block.h | 6 | ||||
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 36 | ||||
-rw-r--r-- | net/socket/client_socket_pool_base.h | 2 |
4 files changed, 30 insertions, 25 deletions
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc index e879a8f..d318647 100644 --- a/net/cookies/cookie_monster.cc +++ b/net/cookies/cookie_monster.cc @@ -552,6 +552,9 @@ class CookieMonster::DeleteTask : public CookieMonsterTask { // CookieMonsterTask: virtual void Run() override; + protected: + ~DeleteTask() override; + private: // Runs the delete task and returns a result. virtual Result RunDeleteTask() = 0; @@ -564,8 +567,12 @@ class CookieMonster::DeleteTask : public CookieMonsterTask { }; template <typename Result> -base::Closure CookieMonster::DeleteTask<Result>:: -RunDeleteTaskAndBindCallback() { +CookieMonster::DeleteTask<Result>::~DeleteTask() { +} + +template <typename Result> +base::Closure +CookieMonster::DeleteTask<Result>::RunDeleteTaskAndBindCallback() { Result result = RunDeleteTask(); if (callback_.is_null()) return base::Closure(); diff --git a/net/disk_cache/blockfile/storage_block.h b/net/disk_cache/blockfile/storage_block.h index 0d51474..6db4a31 100644 --- a/net/disk_cache/blockfile/storage_block.h +++ b/net/disk_cache/blockfile/storage_block.h @@ -34,9 +34,9 @@ class StorageBlock : public FileBlock { virtual ~StorageBlock(); // FileBlock interface. - virtual void* buffer() const; - virtual size_t size() const; - virtual int offset() const; + void* buffer() const override; + size_t size() const override; + int offset() const override; // Allows the overide of dummy values passed on the constructor. bool LazyInit(MappedFile* file, Addr address); diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index a0248fe..19dfeb7 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -516,32 +516,30 @@ class CaptureGroupNameSocketPool : public ParentPool { return last_group_name_; } - virtual int RequestSocket(const std::string& group_name, - const void* socket_params, - RequestPriority priority, - ClientSocketHandle* handle, - const CompletionCallback& callback, - const BoundNetLog& net_log) { + int RequestSocket(const std::string& group_name, + const void* socket_params, + RequestPriority priority, + ClientSocketHandle* handle, + const CompletionCallback& callback, + const BoundNetLog& net_log) override { last_group_name_ = group_name; return ERR_IO_PENDING; } - virtual void CancelRequest(const std::string& group_name, - ClientSocketHandle* handle) {} - virtual void ReleaseSocket(const std::string& group_name, - scoped_ptr<StreamSocket> socket, - int id) {} - virtual void CloseIdleSockets() {} - virtual int IdleSocketCount() const { - return 0; - } - virtual int IdleSocketCountInGroup(const std::string& group_name) const { + void CancelRequest(const std::string& group_name, + ClientSocketHandle* handle) override {} + void ReleaseSocket(const std::string& group_name, + scoped_ptr<StreamSocket> socket, + int id) override {} + void CloseIdleSockets() override {} + int IdleSocketCount() const override { return 0; } + int IdleSocketCountInGroup(const std::string& group_name) const override { return 0; } - virtual LoadState GetLoadState(const std::string& group_name, - const ClientSocketHandle* handle) const { + LoadState GetLoadState(const std::string& group_name, + const ClientSocketHandle* handle) const override { return LOAD_STATE_IDLE; } - virtual base::TimeDelta ConnectionTimeout() const { + base::TimeDelta ConnectionTimeout() const override { return base::TimeDelta(); } diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h index ec4e33c..a7dcbf5 100644 --- a/net/socket/client_socket_pool_base.h +++ b/net/socket/client_socket_pool_base.h @@ -859,7 +859,7 @@ class ClientSocketPoolBase { group_name, casted_request, delegate); } - virtual base::TimeDelta ConnectionTimeout() const { + base::TimeDelta ConnectionTimeout() const override { return connect_job_factory_->ConnectionTimeout(); } |