OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/ref_counted.h" | |
13 #include "chrome/browser/extensions/extension_event_router.h" | 13 #include "chrome/browser/extensions/extension_event_router.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/extensions/test_extension_service.h" | 15 #include "chrome/browser/extensions/test_extension_service.h" |
16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
18 | 18 |
19 class SettingsFrontend; | |
20 | 19 |
21 namespace extensions { | 20 namespace extensions { |
22 | 21 |
| 22 class SettingsFrontend; |
| 23 class SettingsStorage; |
| 24 |
23 // Utilities for extension settings API tests. | 25 // Utilities for extension settings API tests. |
24 namespace settings_test_util { | 26 namespace settings_test_util { |
25 | 27 |
26 // Synchronously gets the storage area for an extension from |frontend|. | 28 // Synchronously gets the storage area for an extension from |frontend|. |
27 SettingsStorage* GetStorage( | 29 SettingsStorage* GetStorage( |
28 const std::string& extension_id, SettingsFrontend* frontend); | 30 const std::string& extension_id, SettingsFrontend* frontend); |
29 | 31 |
30 // An ExtensionService which allows extensions to be hand-added to be returned | 32 // An ExtensionService which allows extensions to be hand-added to be returned |
31 // by GetExtensionById. | 33 // by GetExtensionById. |
32 class MockExtensionService : public TestExtensionService { | 34 class MockExtensionService : public TestExtensionService { |
(...skipping 28 matching lines...) Expand all Loading... |
61 private: | 63 private: |
62 MockExtensionService extension_service_; | 64 MockExtensionService extension_service_; |
63 scoped_ptr<ExtensionEventRouter> event_router_; | 65 scoped_ptr<ExtensionEventRouter> event_router_; |
64 }; | 66 }; |
65 | 67 |
66 } // namespace settings_test_util | 68 } // namespace settings_test_util |
67 | 69 |
68 } // namespace extensions | 70 } // namespace extensions |
69 | 71 |
70 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ | 72 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_TEST_UTIL_H_ |
OLD | NEW |