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

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

Issue 14757022: Add a non-blocking "OneShotEvent" class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a test for the behavior within a Post()ed callback Created 7 years, 7 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 | « chrome/browser/extensions/test_extension_system.h ('k') | chrome/chrome_common.gypi » ('j') | 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 "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/blacklist.h" 9 #include "chrome/browser/extensions/blacklist.h"
10 #include "chrome/browser/extensions/event_router.h" 10 #include "chrome/browser/extensions/event_router.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 new StandardManagementPolicyProvider(ExtensionPrefs::Get(profile_))); 93 new StandardManagementPolicyProvider(ExtensionPrefs::Get(profile_)));
94 management_policy_.reset(new ManagementPolicy()); 94 management_policy_.reset(new ManagementPolicy());
95 management_policy_->RegisterProvider( 95 management_policy_->RegisterProvider(
96 standard_management_policy_provider_.get()); 96 standard_management_policy_provider_.get());
97 extension_service_.reset(new ExtensionService(profile_, 97 extension_service_.reset(new ExtensionService(profile_,
98 command_line, 98 command_line,
99 install_directory, 99 install_directory,
100 ExtensionPrefs::Get(profile_), 100 ExtensionPrefs::Get(profile_),
101 blacklist_.get(), 101 blacklist_.get(),
102 autoupdate_enabled, 102 autoupdate_enabled,
103 true)); 103 true,
104 &ready_));
104 extension_service_->ClearProvidersForTesting(); 105 extension_service_->ClearProvidersForTesting();
105 return extension_service_.get(); 106 return extension_service_.get();
106 } 107 }
107 108
108 ExtensionService* TestExtensionSystem::extension_service() { 109 ExtensionService* TestExtensionSystem::extension_service() {
109 return extension_service_.get(); 110 return extension_service_.get();
110 } 111 }
111 112
112 ManagementPolicy* TestExtensionSystem::management_policy() { 113 ManagementPolicy* TestExtensionSystem::management_policy() {
113 return management_policy_.get(); 114 return management_policy_.get();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 170 }
170 171
171 ExtensionWarningService* TestExtensionSystem::warning_service() { 172 ExtensionWarningService* TestExtensionSystem::warning_service() {
172 return NULL; 173 return NULL;
173 } 174 }
174 175
175 Blacklist* TestExtensionSystem::blacklist() { 176 Blacklist* TestExtensionSystem::blacklist() {
176 return blacklist_.get(); 177 return blacklist_.get();
177 } 178 }
178 179
180 const OneShotEvent& TestExtensionSystem::ready() const {
181 return ready_;
182 }
183
179 // static 184 // static
180 ProfileKeyedService* TestExtensionSystem::Build( 185 ProfileKeyedService* TestExtensionSystem::Build(
181 content::BrowserContext* profile) { 186 content::BrowserContext* profile) {
182 return new TestExtensionSystem(static_cast<Profile*>(profile)); 187 return new TestExtensionSystem(static_cast<Profile*>(profile));
183 } 188 }
184 189
185 } // namespace extensions 190 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_system.h ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698