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

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

Issue 10690139: Don't create external extension providers for a TestExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698