Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: extensions/browser/mock_extension_system.h

Issue 1104543004: Update {virtual,override} to follow C++11 style in extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_ 5 #ifndef EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_
6 #define EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_ 6 #define EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_
7 7
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" 8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "extensions/browser/extension_registry_factory.h" 9 #include "extensions/browser/extension_registry_factory.h"
10 #include "extensions/browser/extension_system.h" 10 #include "extensions/browser/extension_system.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 template <typename T> 64 template <typename T>
65 class MockExtensionSystemFactory : public ExtensionSystemProvider { 65 class MockExtensionSystemFactory : public ExtensionSystemProvider {
66 public: 66 public:
67 MockExtensionSystemFactory() 67 MockExtensionSystemFactory()
68 : ExtensionSystemProvider( 68 : ExtensionSystemProvider(
69 "MockExtensionSystem", 69 "MockExtensionSystem",
70 BrowserContextDependencyManager::GetInstance()) { 70 BrowserContextDependencyManager::GetInstance()) {
71 DependsOn(ExtensionRegistryFactory::GetInstance()); 71 DependsOn(ExtensionRegistryFactory::GetInstance());
72 } 72 }
73 73
74 virtual ~MockExtensionSystemFactory() {} 74 ~MockExtensionSystemFactory() override {}
75 75
76 // BrowserContextKeyedServiceFactory overrides: 76 // BrowserContextKeyedServiceFactory overrides:
77 virtual KeyedService* BuildServiceInstanceFor( 77 KeyedService* BuildServiceInstanceFor(
78 content::BrowserContext* context) const override { 78 content::BrowserContext* context) const override {
79 return new T(context); 79 return new T(context);
80 } 80 }
81 81
82 // ExtensionSystemProvider overrides: 82 // ExtensionSystemProvider overrides:
83 virtual ExtensionSystem* GetForBrowserContext( 83 ExtensionSystem* GetForBrowserContext(
84 content::BrowserContext* context) override { 84 content::BrowserContext* context) override {
85 return static_cast<ExtensionSystem*>( 85 return static_cast<ExtensionSystem*>(
86 GetServiceForBrowserContext(context, true)); 86 GetServiceForBrowserContext(context, true));
87 } 87 }
88 88
89 private: 89 private:
90 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystemFactory); 90 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystemFactory);
91 }; 91 };
92 92
93 } // namespace extensions 93 } // namespace extensions
94 94
95 #endif // EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_ 95 #endif // EXTENSIONS_BROWSER_MOCK_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « extensions/browser/browser_context_keyed_api_factory.h ('k') | extensions/common/permissions/set_disjunction_permission.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698