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

Unified Diff: chrome/browser/autocomplete/shortcuts_provider_unittest.cc

Issue 271393003: Use ExtensionRegistryObserver instead of deprecated extension notification from autocomplete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: colon to period Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_backend.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/shortcuts_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc
index bb3ca8d0ebe06b7336d5a1e7c12e9589084cb3a8..a2a8b1afa1c7e8bf193fbd5be5791153da5d2f50 100644
--- a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc
+++ b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc
@@ -32,6 +32,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_service.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/value_builder.h"
@@ -841,12 +842,10 @@ TEST_F(ShortcutsProviderTest, Extension) {
.Set("version", "1.0"))
.SetID("cedabbhfglmiikkmdgcpjdkocfcmbkee")
.Build();
- extensions::UnloadedExtensionInfo details(
+ extensions::ExtensionRegistry* registry =
+ extensions::ExtensionRegistry::Get(&profile_);
+ registry->TriggerOnUnloaded(
extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::Source<Profile>(&profile_),
- content::Details<extensions::UnloadedExtensionInfo>(&details));
// Now the URL should have disappeared.
RunTest(text, false, ExpectedURLs(), std::string(), base::string16());
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_backend.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698