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

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

Issue 14200028: Make CrosSettings and DeviceSettingsService non Lazy instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoginUtilsTest Created 7 years, 8 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/extensions/api/alarms/alarm_manager.h" 9 #include "chrome/browser/extensions/api/alarms/alarm_manager.h"
10 #include "chrome/browser/extensions/api/messaging/message_service.h" 10 #include "chrome/browser/extensions/api/messaging/message_service.h"
(...skipping 15 matching lines...) Expand all
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 28
29 using content::BrowserThread; 29 using content::BrowserThread;
30 30
31 namespace extensions { 31 namespace extensions {
32 32
33 TestExtensionSystem::TestExtensionSystem(Profile* profile) 33 TestExtensionSystem::TestExtensionSystem(Profile* profile)
34 : profile_(profile), 34 : profile_(profile),
35 info_map_(new ExtensionInfoMap()) { 35 info_map_(new ExtensionInfoMap()) {
36 #if defined OS_CHROMEOS
37 // TestExtensionSystem may or may not be created within
38 // TestExtensionEnvironment, so only create a ScopedTestCrosSettings instance
39 // if none has been created.
40 if (!chromeos::CrosSettings::IsInitialized())
41 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings);
42 #endif
36 } 43 }
37 44
38 TestExtensionSystem::~TestExtensionSystem() { 45 TestExtensionSystem::~TestExtensionSystem() {
39 } 46 }
40 47
41 void TestExtensionSystem::Shutdown() { 48 void TestExtensionSystem::Shutdown() {
42 extension_process_manager_.reset(); 49 extension_process_manager_.reset();
43 } 50 }
44 51
45 void TestExtensionSystem::CreateExtensionProcessManager() { 52 void TestExtensionSystem::CreateExtensionProcessManager() {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 Blacklist* TestExtensionSystem::blacklist() { 187 Blacklist* TestExtensionSystem::blacklist() {
181 return blacklist_.get(); 188 return blacklist_.get();
182 } 189 }
183 190
184 // static 191 // static
185 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) { 192 ProfileKeyedService* TestExtensionSystem::Build(Profile* profile) {
186 return new TestExtensionSystem(profile); 193 return new TestExtensionSystem(profile);
187 } 194 }
188 195
189 } // namespace extensions 196 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698