| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 std::map<std::string, scoped_refptr<Extension> > extensions_; | 64 std::map<std::string, scoped_refptr<Extension> > extensions_; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 // A mock ExtensionSystem to serve an EventRouter. | 67 // A mock ExtensionSystem to serve an EventRouter. |
| 68 class MockExtensionSystem : public TestExtensionSystem { | 68 class MockExtensionSystem : public TestExtensionSystem { |
| 69 public: | 69 public: |
| 70 explicit MockExtensionSystem(Profile* profile); | 70 explicit MockExtensionSystem(Profile* profile); |
| 71 virtual ~MockExtensionSystem(); | 71 virtual ~MockExtensionSystem(); |
| 72 | 72 |
| 73 virtual EventRouter* event_router() OVERRIDE; | 73 virtual EventRouter* event_router() OVERRIDE; |
| 74 virtual ExtensionService* extension_service() OVERRIDE; |
| 74 | 75 |
| 75 private: | 76 private: |
| 76 scoped_ptr<EventRouter> event_router_; | 77 scoped_ptr<EventRouter> event_router_; |
| 78 MockExtensionService extension_service_; |
| 77 | 79 |
| 78 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem); | 80 DISALLOW_COPY_AND_ASSIGN(MockExtensionSystem); |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 // A Profile which returns an ExtensionService with enough functionality for | 83 // A Profile which returns an ExtensionService with enough functionality for |
| 82 // the tests. | 84 // the tests. |
| 83 class MockProfile : public TestingProfile { | 85 class MockProfile : public TestingProfile { |
| 84 public: | 86 public: |
| 85 explicit MockProfile(const FilePath& file_path); | 87 explicit MockProfile(const FilePath& file_path); |
| 86 virtual ~MockProfile(); | 88 virtual ~MockProfile(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 114 virtual ~ScopedSettingsStorageFactory(); | 116 virtual ~ScopedSettingsStorageFactory(); |
| 115 | 117 |
| 116 scoped_refptr<SettingsStorageFactory> delegate_; | 118 scoped_refptr<SettingsStorageFactory> delegate_; |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 } // namespace settings_test_util | 121 } // namespace settings_test_util |
| 120 | 122 |
| 121 } // namespace extensions | 123 } // namespace extensions |
| 122 | 124 |
| 123 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ | 125 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ |
| OLD | NEW |