diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 05:38:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-21 12:38:39 +0000 |
commit | 9168b2fe3e30afa4fd9a9500ba0725edf97c20a3 (patch) | |
tree | bb288d5b7fccc259391b83b18b12368a0d516b21 /extensions/browser/api/declarative | |
parent | ae36a4a3f2efd040be2e563b0bff0592b0a5b5a1 (diff) | |
download | chromium_src-9168b2fe3e30afa4fd9a9500ba0725edf97c20a3.zip chromium_src-9168b2fe3e30afa4fd9a9500ba0725edf97c20a3.tar.gz chromium_src-9168b2fe3e30afa4fd9a9500ba0725edf97c20a3.tar.bz2 |
Standardize usage of virtual/override/final in extensions/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=yoz@chromium.org
Review URL: https://codereview.chromium.org/664933004
Cr-Commit-Position: refs/heads/master@{#300475}
Diffstat (limited to 'extensions/browser/api/declarative')
4 files changed, 29 insertions, 32 deletions
diff --git a/extensions/browser/api/declarative/declarative_api.h b/extensions/browser/api/declarative/declarative_api.h index acc2edf..7f3b1a2 100644 --- a/extensions/browser/api/declarative/declarative_api.h +++ b/extensions/browser/api/declarative/declarative_api.h @@ -17,11 +17,11 @@ class RulesFunction : public AsyncExtensionFunction { RulesFunction(); protected: - virtual ~RulesFunction(); + ~RulesFunction() override; // ExtensionFunction: - virtual bool HasPermission() override; - virtual bool RunAsync() override; + bool HasPermission() override; + bool RunAsync() override; // Concrete implementation of the RulesFunction that is being called // on the thread on which the respective RulesRegistry lives. @@ -36,10 +36,10 @@ class EventsEventAddRulesFunction : public RulesFunction { DECLARE_EXTENSION_FUNCTION("events.addRules", EVENTS_ADDRULES) protected: - virtual ~EventsEventAddRulesFunction() {} + ~EventsEventAddRulesFunction() override {} // RulesFunction: - virtual bool RunAsyncOnCorrectThread() override; + bool RunAsyncOnCorrectThread() override; }; class EventsEventRemoveRulesFunction : public RulesFunction { @@ -47,10 +47,10 @@ class EventsEventRemoveRulesFunction : public RulesFunction { DECLARE_EXTENSION_FUNCTION("events.removeRules", EVENTS_REMOVERULES) protected: - virtual ~EventsEventRemoveRulesFunction() {} + ~EventsEventRemoveRulesFunction() override {} // RulesFunction: - virtual bool RunAsyncOnCorrectThread() override; + bool RunAsyncOnCorrectThread() override; }; class EventsEventGetRulesFunction : public RulesFunction { @@ -58,10 +58,10 @@ class EventsEventGetRulesFunction : public RulesFunction { DECLARE_EXTENSION_FUNCTION("events.getRules", EVENTS_GETRULES) protected: - virtual ~EventsEventGetRulesFunction() {} + ~EventsEventGetRulesFunction() override {} // RulesFunction: - virtual bool RunAsyncOnCorrectThread() override; + bool RunAsyncOnCorrectThread() override; }; } // namespace extensions diff --git a/extensions/browser/api/declarative/deduping_factory_unittest.cc b/extensions/browser/api/declarative/deduping_factory_unittest.cc index dfe30f5..a10cb9c 100644 --- a/extensions/browser/api/declarative/deduping_factory_unittest.cc +++ b/extensions/browser/api/declarative/deduping_factory_unittest.cc @@ -38,7 +38,7 @@ class BaseClass : public base::RefCounted<BaseClass> { class Foo : public BaseClass { public: explicit Foo(int parameter) : BaseClass(FOO), parameter_(parameter) {} - virtual bool Equals(const BaseClass* other) const override { + bool Equals(const BaseClass* other) const override { return other->type() == type() && static_cast<const Foo*>(other)->parameter_ == parameter_; } @@ -48,7 +48,7 @@ class Foo : public BaseClass { private: friend class base::RefCounted<BaseClass>; - virtual ~Foo() {} + ~Foo() override {} // Note that this class must be immutable. const int parameter_; diff --git a/extensions/browser/api/declarative/rules_registry_service.h b/extensions/browser/api/declarative/rules_registry_service.h index e019806..693d5e7 100644 --- a/extensions/browser/api/declarative/rules_registry_service.h +++ b/extensions/browser/api/declarative/rules_registry_service.h @@ -54,11 +54,11 @@ class RulesRegistryService : public BrowserContextKeyedAPI, }; explicit RulesRegistryService(content::BrowserContext* context); - virtual ~RulesRegistryService(); + ~RulesRegistryService() override; // Unregisters refptrs to concrete RulesRegistries at other objects that were // created by us so that the RulesRegistries can be released. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<RulesRegistryService>* @@ -100,21 +100,19 @@ class RulesRegistryService : public BrowserContextKeyedAPI, RulesRegistryMap; // Implementation of content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // Iterates over all registries, and calls |notification_callback| on them // with |extension_id| as the argument. If a registry lives on a different diff --git a/extensions/browser/api/declarative/test_rules_registry.h b/extensions/browser/api/declarative/test_rules_registry.h index 3d35c2b..d42877f 100644 --- a/extensions/browser/api/declarative/test_rules_registry.h +++ b/extensions/browser/api/declarative/test_rules_registry.h @@ -23,21 +23,20 @@ class TestRulesRegistry : public RulesRegistry { const WebViewKey& webview_key); // RulesRegistry implementation: - virtual std::string AddRulesImpl( + std::string AddRulesImpl( const std::string& extension_id, - const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) override; - virtual std::string RemoveRulesImpl( + const std::vector<linked_ptr<RulesRegistry::Rule>>& rules) override; + std::string RemoveRulesImpl( const std::string& extension_id, const std::vector<std::string>& rule_identifiers) override; - virtual std::string RemoveAllRulesImpl( - const std::string& extension_id) override; + std::string RemoveAllRulesImpl(const std::string& extension_id) override; // Sets the result message that will be returned by the next call of // AddRulesImpl, RemoveRulesImpl and RemoveAllRulesImpl. void SetResult(const std::string& result); protected: - virtual ~TestRulesRegistry(); + ~TestRulesRegistry() override; private: // The string that gets returned by the implementation functions of |