summaryrefslogtreecommitdiffstats
path: root/components/keyed_service
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-10-21 04:24:56 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 11:25:34 +0000
commit00ea022b81af00857b352bae68d4ba2eb3e1493b (patch)
treeb5e3e536a25f154ab5410d611736832c11b2cfad /components/keyed_service
parent0b0885ca539071e7864061fde54c7345a0fd2aae (diff)
downloadchromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.zip
chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.gz
chromium_src-00ea022b81af00857b352bae68d4ba2eb3e1493b.tar.bz2
Standardize usage of virtual/override/final in components/
BUG=417463 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/666133002 Cr-Commit-Position: refs/heads/master@{#300456}
Diffstat (limited to 'components/keyed_service')
-rw-r--r--components/keyed_service/content/browser_context_dependency_manager_unittest.cc5
-rw-r--r--components/keyed_service/content/browser_context_keyed_service_factory.h17
-rw-r--r--components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h15
3 files changed, 15 insertions, 22 deletions
diff --git a/components/keyed_service/content/browser_context_dependency_manager_unittest.cc b/components/keyed_service/content/browser_context_dependency_manager_unittest.cc
index e3bbdc1..fe8e088 100644
--- a/components/keyed_service/content/browser_context_dependency_manager_unittest.cc
+++ b/components/keyed_service/content/browser_context_dependency_manager_unittest.cc
@@ -33,14 +33,13 @@ class TestService : public BrowserContextKeyedServiceFactory {
name_(name),
fill_on_shutdown_(fill_on_shutdown) {}
- virtual KeyedService* BuildServiceInstanceFor(
+ KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override {
ADD_FAILURE() << "This isn't part of the tests!";
return NULL;
}
- virtual void BrowserContextShutdown(content::BrowserContext* context)
- override {
+ void BrowserContextShutdown(content::BrowserContext* context) override {
fill_on_shutdown_->push_back(name_);
}
diff --git a/components/keyed_service/content/browser_context_keyed_service_factory.h b/components/keyed_service/content/browser_context_keyed_service_factory.h
index 8ad8e13..29637d4 100644
--- a/components/keyed_service/content/browser_context_keyed_service_factory.h
+++ b/components/keyed_service/content/browser_context_keyed_service_factory.h
@@ -56,7 +56,7 @@ class KEYED_SERVICE_EXPORT BrowserContextKeyedServiceFactory
// {}
BrowserContextKeyedServiceFactory(const char* name,
BrowserContextDependencyManager* manager);
- virtual ~BrowserContextKeyedServiceFactory();
+ ~BrowserContextKeyedServiceFactory() override;
// Common implementation that maps |context| to some service object. Deals
// with incognito contexts per subclass instructions with
@@ -91,15 +91,12 @@ class KEYED_SERVICE_EXPORT BrowserContextKeyedServiceFactory
// Secondly, BrowserContextDestroyed() is called on every ServiceFactory
// and the default implementation removes it from |mapping_| and deletes
// the pointer.
- virtual void BrowserContextShutdown(content::BrowserContext* context)
- override;
- virtual void BrowserContextDestroyed(content::BrowserContext* context)
- override;
-
- virtual void SetEmptyTestingFactory(content::BrowserContext* context)
- override;
- virtual bool HasTestingFactory(content::BrowserContext* context) override;
- virtual void CreateServiceNow(content::BrowserContext* context) override;
+ void BrowserContextShutdown(content::BrowserContext* context) override;
+ void BrowserContextDestroyed(content::BrowserContext* context) override;
+
+ void SetEmptyTestingFactory(content::BrowserContext* context) override;
+ bool HasTestingFactory(content::BrowserContext* context) override;
+ void CreateServiceNow(content::BrowserContext* context) override;
private:
friend class BrowserContextDependencyManager;
diff --git a/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h b/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h
index 729b49b..f6f49ca 100644
--- a/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h
+++ b/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h
@@ -55,7 +55,7 @@ class KEYED_SERVICE_EXPORT RefcountedBrowserContextKeyedServiceFactory
RefcountedBrowserContextKeyedServiceFactory(
const char* name,
BrowserContextDependencyManager* manager);
- virtual ~RefcountedBrowserContextKeyedServiceFactory();
+ ~RefcountedBrowserContextKeyedServiceFactory() override;
scoped_refptr<RefcountedKeyedService> GetServiceForBrowserContext(
content::BrowserContext* context,
@@ -71,14 +71,11 @@ class KEYED_SERVICE_EXPORT RefcountedBrowserContextKeyedServiceFactory
virtual scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
content::BrowserContext* context) const = 0;
- virtual void BrowserContextShutdown(content::BrowserContext* context)
- override;
- virtual void BrowserContextDestroyed(content::BrowserContext* context)
- override;
- virtual void SetEmptyTestingFactory(content::BrowserContext* context)
- override;
- virtual bool HasTestingFactory(content::BrowserContext* context) override;
- virtual void CreateServiceNow(content::BrowserContext* context) override;
+ void BrowserContextShutdown(content::BrowserContext* context) override;
+ void BrowserContextDestroyed(content::BrowserContext* context) override;
+ void SetEmptyTestingFactory(content::BrowserContext* context) override;
+ bool HasTestingFactory(content::BrowserContext* context) override;
+ void CreateServiceNow(content::BrowserContext* context) override;
private:
typedef std::map<content::BrowserContext*,