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 #include "chrome/browser/extensions/test_extension_system.h" | 5 #include "chrome/browser/extensions/test_extension_system.h" |
6 | 6 |
7 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" | 7 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" |
8 #include "chrome/browser/extensions/extension_devtools_manager.h" | 8 #include "chrome/browser/extensions/extension_devtools_manager.h" |
9 #include "chrome/browser/extensions/extension_event_router.h" | 9 #include "chrome/browser/extensions/extension_event_router.h" |
10 #include "chrome/browser/extensions/extension_info_map.h" | 10 #include "chrome/browser/extensions/extension_info_map.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 state_store_.reset(new extensions::StateStore( | 61 state_store_.reset(new extensions::StateStore( |
62 profile_, | 62 profile_, |
63 new TestingValueStore())); | 63 new TestingValueStore())); |
64 extension_prefs_->Init(extensions_disabled); | 64 extension_prefs_->Init(extensions_disabled); |
65 extension_service_.reset(new ExtensionService(profile_, | 65 extension_service_.reset(new ExtensionService(profile_, |
66 command_line, | 66 command_line, |
67 install_directory, | 67 install_directory, |
68 extension_prefs_.get(), | 68 extension_prefs_.get(), |
69 autoupdate_enabled, | 69 autoupdate_enabled, |
70 true)); | 70 true)); |
| 71 extension_service_->ClearProvidersForTesting(); |
71 return extension_service_.get(); | 72 return extension_service_.get(); |
72 } | 73 } |
73 | 74 |
74 extensions::ManagementPolicy* TestExtensionSystem::CreateManagementPolicy() { | 75 extensions::ManagementPolicy* TestExtensionSystem::CreateManagementPolicy() { |
75 management_policy_.reset(new extensions::ManagementPolicy()); | 76 management_policy_.reset(new extensions::ManagementPolicy()); |
76 DCHECK(extension_prefs_.get()); | 77 DCHECK(extension_prefs_.get()); |
77 management_policy_->RegisterProvider(extension_prefs_.get()); | 78 management_policy_->RegisterProvider(extension_prefs_.get()); |
78 | 79 |
79 return management_policy(); | 80 return management_policy(); |
80 } | 81 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 131 |
131 extensions::RulesRegistryService* | 132 extensions::RulesRegistryService* |
132 TestExtensionSystem::rules_registry_service() { | 133 TestExtensionSystem::rules_registry_service() { |
133 return NULL; | 134 return NULL; |
134 } | 135 } |
135 | 136 |
136 // static | 137 // static |
137 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { | 138 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { |
138 return new TestExtensionSystem(profile); | 139 return new TestExtensionSystem(profile); |
139 } | 140 } |
OLD | NEW |