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

Unified Diff: extensions/browser/image_loader_unittest.cc

Issue 346193002: Use ExtensionRegistry in EventRouter and ApiResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/image_loader_unittest.cc
diff --git a/extensions/browser/image_loader_unittest.cc b/extensions/browser/image_loader_unittest.cc
index 68b93b0f841640c63ffdfda73a6b7d9b1b90291e..9c0d8b9ce5d8c37abdfb8408a6940de1ada3c2ca 100644
--- a/extensions/browser/image_loader_unittest.cc
+++ b/extensions/browser/image_loader_unittest.cc
@@ -12,8 +12,10 @@
#include "chrome/browser/chrome_notification_types.h"
Devlin 2014/06/25 19:59:54 nit: We should be able to remove this and notifica
limasdf 2014/07/20 06:35:50 Done. Handled in seperate CL :)
#include "chrome/common/chrome_paths.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread.h"
#include "extensions/browser/component_extension_resource_manager.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
@@ -186,12 +188,10 @@ TEST_F(ImageLoaderTest, DeleteExtensionWhileWaitingForCache) {
EXPECT_EQ(0, image_loaded_count());
// Send out notification the extension was uninstalled.
- UnloadedExtensionInfo details(extension.get(),
- UnloadedExtensionInfo::REASON_UNINSTALL);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::NotificationService::AllSources(),
- content::Details<UnloadedExtensionInfo>(&details));
+ scoped_ptr<content::TestBrowserContext> browser_context(
+ new content::TestBrowserContext());
+ extensions::ExtensionRegistry::Get(browser_context.get())->TriggerOnUnloaded(
+ extension.get(), UnloadedExtensionInfo::REASON_UNINSTALL);
// Chuck the extension, that way if anyone tries to access it we should crash
// or get valgrind errors.
« extensions/browser/event_router.cc ('K') | « extensions/browser/extension_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698