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 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 void TestExtensionSystem::Shutdown() { | 29 void TestExtensionSystem::Shutdown() { |
30 extension_process_manager_.reset(); | 30 extension_process_manager_.reset(); |
31 } | 31 } |
32 | 32 |
33 void TestExtensionSystem::CreateExtensionProcessManager() { | 33 void TestExtensionSystem::CreateExtensionProcessManager() { |
34 extension_process_manager_.reset(ExtensionProcessManager::Create(profile_)); | 34 extension_process_manager_.reset(ExtensionProcessManager::Create(profile_)); |
35 } | 35 } |
36 | 36 |
37 void TestExtensionSystem::CreateAlarmManager() { | 37 void TestExtensionSystem::CreateAlarmManager( |
38 alarm_manager_.reset(new extensions::AlarmManager(profile_)); | 38 extensions::AlarmManager::TimeProvider now) { |
| 39 alarm_manager_.reset(new extensions::AlarmManager(profile_, now)); |
39 } | 40 } |
40 | 41 |
41 ExtensionService* TestExtensionSystem::CreateExtensionService( | 42 ExtensionService* TestExtensionSystem::CreateExtensionService( |
42 const CommandLine* command_line, | 43 const CommandLine* command_line, |
43 const FilePath& install_directory, | 44 const FilePath& install_directory, |
44 bool autoupdate_enabled) { | 45 bool autoupdate_enabled) { |
45 bool extensions_disabled = | 46 bool extensions_disabled = |
46 command_line && command_line->HasSwitch(switches::kDisableExtensions); | 47 command_line && command_line->HasSwitch(switches::kDisableExtensions); |
47 | 48 |
48 // Note that the GetPrefs() creates a TestingPrefService, therefore | 49 // Note that the GetPrefs() creates a TestingPrefService, therefore |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 124 |
124 extensions::RulesRegistryService* | 125 extensions::RulesRegistryService* |
125 TestExtensionSystem::rules_registry_service() { | 126 TestExtensionSystem::rules_registry_service() { |
126 return NULL; | 127 return NULL; |
127 } | 128 } |
128 | 129 |
129 // static | 130 // static |
130 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { | 131 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { |
131 return new TestExtensionSystem(profile); | 132 return new TestExtensionSystem(profile); |
132 } | 133 } |
OLD | NEW |