| Index: chrome/browser/extensions/settings/settings_test_util.h
|
| diff --git a/chrome/browser/extensions/settings/settings_test_util.h b/chrome/browser/extensions/settings/settings_test_util.h
|
| index 0acb66930e83821ca1ba7d0da6b2639e566fa25d..f38d8819bf22743e68636d1aecf84fc90985a154 100644
|
| --- a/chrome/browser/extensions/settings/settings_test_util.h
|
| +++ b/chrome/browser/extensions/settings/settings_test_util.h
|
| @@ -17,6 +17,7 @@
|
| #include "chrome/browser/extensions/settings/settings_namespace.h"
|
| #include "chrome/browser/extensions/settings/settings_storage_factory.h"
|
| #include "chrome/browser/extensions/test_extension_service.h"
|
| +#include "chrome/browser/extensions/test_extension_system.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/test/base/testing_profile.h"
|
|
|
| @@ -63,8 +64,22 @@ class MockExtensionService : public TestExtensionService {
|
| std::map<std::string, scoped_refptr<Extension> > extensions_;
|
| };
|
|
|
| -// A Profile which returns ExtensionService and EventRouters with
|
| -// enough functionality for the tests.
|
| +// A mock ExtensionSystem to serve an EventRouter.
|
| +class MockExtensionSystem : public TestExtensionSystem {
|
| + public:
|
| + explicit MockExtensionSystem(Profile* profile);
|
| + virtual ~MockExtensionSystem();
|
| +
|
| + virtual EventRouter* event_router() OVERRIDE;
|
| +
|
| + private:
|
| + scoped_ptr<EventRouter> event_router_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem);
|
| +};
|
| +
|
| +// A Profile which returns an ExtensionService with enough functionality for
|
| +// the tests.
|
| class MockProfile : public TestingProfile {
|
| public:
|
| explicit MockProfile(const FilePath& file_path);
|
| @@ -73,13 +88,10 @@ class MockProfile : public TestingProfile {
|
| // Returns the same object as GetExtensionService, but not coaxed into an
|
| // ExtensionService; use this method from tests.
|
| MockExtensionService* GetMockExtensionService();
|
| -
|
| virtual ExtensionService* GetExtensionService() OVERRIDE;
|
| - virtual EventRouter* GetExtensionEventRouter() OVERRIDE;
|
|
|
| private:
|
| MockExtensionService extension_service_;
|
| - scoped_ptr<EventRouter> event_router_;
|
| };
|
|
|
| // SettingsStorageFactory which acts as a wrapper for other factories.
|
|
|