Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: chrome/browser/extensions/test_extension_system.cc

Issue 10545104: Refactor chrome.alarms interface to support absolute alarm deadlines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 120
120 extensions::RulesRegistryService* 121 extensions::RulesRegistryService*
121 TestExtensionSystem::rules_registry_service() { 122 TestExtensionSystem::rules_registry_service() {
122 return NULL; 123 return NULL;
123 } 124 }
124 125
125 // static 126 // static
126 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { 127 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) {
127 return new TestExtensionSystem(profile); 128 return new TestExtensionSystem(profile);
128 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698