summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service_unittest.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 19:46:46 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 19:46:46 +0000
commitae09ca6b5ae2e930ef40fd291a08afd1289fafa1 (patch)
tree7dc3f5ca8440d45cfe905511d2cfd6c776dc4cc1 /chrome/browser/extensions/extensions_service_unittest.cc
parentef6688c58eb5b2d238fd38bcf3513d4ebf7baa78 (diff)
downloadchromium_src-ae09ca6b5ae2e930ef40fd291a08afd1289fafa1.zip
chromium_src-ae09ca6b5ae2e930ef40fd291a08afd1289fafa1.tar.gz
chromium_src-ae09ca6b5ae2e930ef40fd291a08afd1289fafa1.tar.bz2
Load extensions that have their manifest in the Prefs on the UI thread.
There is some migration code for loading old extensions which we do on the UI thread as well, for simplicity. This will only happen the first time the user starts Chrome, so I think it's OK. Also cleaned up the EXTENSIONS_LOADED notification to send out a single extension, instead of a 1-element list of extensions. BUG=18293 TEST=loading extensions should still work Review URL: http://codereview.chromium.org/174208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service_unittest.cc')
-rw-r--r--chrome/browser/extensions/extensions_service_unittest.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc
index d19a3d3..6df27a9 100644
--- a/chrome/browser/extensions/extensions_service_unittest.cc
+++ b/chrome/browser/extensions/extensions_service_unittest.cc
@@ -197,7 +197,7 @@ class ExtensionsServiceTest
: public testing::Test, public NotificationObserver {
public:
ExtensionsServiceTest() : installed_(NULL) {
- registrar_.Add(this, NotificationType::EXTENSIONS_LOADED,
+ registrar_.Add(this, NotificationType::EXTENSION_LOADED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
NotificationService::AllSources());
@@ -275,12 +275,9 @@ class ExtensionsServiceTest
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::EXTENSIONS_LOADED: {
- ExtensionList* list = Details<ExtensionList>(details).ptr();
- for (ExtensionList::iterator iter = list->begin(); iter != list->end();
- ++iter) {
- loaded_.push_back(*iter);
- }
+ case NotificationType::EXTENSION_LOADED: {
+ Extension* extension = Details<Extension>(details).ptr();
+ loaded_.push_back(extension);
// The tests rely on the errors being in a certain order, which can vary
// depending on how filesystem iteration works.
std::stable_sort(loaded_.begin(), loaded_.end(), ExtensionsOrder());