diff options
author | nick <nick@chromium.org> | 2015-04-23 09:43:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 16:43:30 +0000 |
commit | 0ec9f9fbbc048a0a05b74cad9c6ee795f89bb641 (patch) | |
tree | 6f09930fb9431138e56ef5b847a97479ad1b160e /extensions/browser/api/socket | |
parent | d60f71748cc8d3fdfa30811b6896df6e4113d15a (diff) | |
download | chromium_src-0ec9f9fbbc048a0a05b74cad9c6ee795f89bb641.zip chromium_src-0ec9f9fbbc048a0a05b74cad9c6ee795f89bb641.tar.gz chromium_src-0ec9f9fbbc048a0a05b74cad9c6ee795f89bb641.tar.bz2 |
Update {virtual,override} to follow C++11 style in extensions.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.
This patch was manually generated using a regex and a text editor.
BUG=417463
Review URL: https://codereview.chromium.org/1104543004
Cr-Commit-Position: refs/heads/master@{#326545}
Diffstat (limited to 'extensions/browser/api/socket')
-rw-r--r-- | extensions/browser/api/socket/socket_api.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/extensions/browser/api/socket/socket_api.h b/extensions/browser/api/socket/socket_api.h index a3e4e0e..d6e4736 100644 --- a/extensions/browser/api/socket/socket_api.h +++ b/extensions/browser/api/socket/socket_api.h @@ -62,7 +62,7 @@ class SocketResourceManager : public SocketResourceManagerInterface { public: SocketResourceManager() : manager_(NULL) {} - virtual bool SetBrowserContext(content::BrowserContext* context) override { + bool SetBrowserContext(content::BrowserContext* context) override { manager_ = ApiResourceManager<T>::Get(context); DCHECK(manager_) << "There is no socket manager. " @@ -72,29 +72,27 @@ class SocketResourceManager : public SocketResourceManagerInterface { return manager_ != NULL; } - virtual int Add(Socket* socket) override { + int Add(Socket* socket) override { // Note: Cast needed here, because "T" may be a subclass of "Socket". return manager_->Add(static_cast<T*>(socket)); } - virtual Socket* Get(const std::string& extension_id, - int api_resource_id) override { + Socket* Get(const std::string& extension_id, int api_resource_id) override { return manager_->Get(extension_id, api_resource_id); } - virtual void Replace(const std::string& extension_id, - int api_resource_id, - Socket* socket) override { + void Replace(const std::string& extension_id, + int api_resource_id, + Socket* socket) override { manager_->Replace(extension_id, api_resource_id, static_cast<T*>(socket)); } - virtual void Remove(const std::string& extension_id, - int api_resource_id) override { + void Remove(const std::string& extension_id, int api_resource_id) override { manager_->Remove(extension_id, api_resource_id); } - virtual base::hash_set<int>* GetResourceIds(const std::string& extension_id) - override { + base::hash_set<int>* GetResourceIds( + const std::string& extension_id) override { return manager_->GetResourceIds(extension_id); } |