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

Unified Diff: chrome/browser/extensions/active_tab_unittest.cc

Issue 259843004: Remove some NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED from c/b/extensions Part2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/active_tab_unittest.cc
diff --git a/chrome/browser/extensions/active_tab_unittest.cc b/chrome/browser/extensions/active_tab_unittest.cc
index ce440d25da42f32c42652975ac1c56bc40bd6a5c..735204c50f7ed5159dbef35fadfaa857b2c27f69 100644
--- a/chrome/browser/extensions/active_tab_unittest.cc
+++ b/chrome/browser/extensions/active_tab_unittest.cc
@@ -24,6 +24,7 @@
#include "content/public/common/frame_navigate_params.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/features/feature.h"
@@ -290,13 +291,10 @@ TEST_F(ActiveTabTest, Uninstalling) {
EXPECT_TRUE(IsAllowed(extension, google));
// Uninstalling the extension should clear its tab permissions.
- UnloadedExtensionInfo details(extension.get(),
- UnloadedExtensionInfo::REASON_DISABLE);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::Source<Profile>(Profile::FromBrowserContext(
- web_contents()->GetBrowserContext())),
- content::Details<UnloadedExtensionInfo>(&details));
+ ExtensionRegistry* registry =
+ ExtensionRegistry::Get(web_contents()->GetBrowserContext());
+ registry->TriggerOnUnloaded(extension.get(),
+ UnloadedExtensionInfo::REASON_DISABLE);
// Note: can't EXPECT_FALSE(IsAllowed) here because uninstalled extensions
// are just that... considered to be uninstalled, and the manager might
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input_ime/input_ime_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698