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

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

Issue 7799008: Fix crash on NTP related to multi-profile extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix sources for incognito Created 9 years, 4 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: chrome/browser/extensions/extension_management_api.cc
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc
index 7c669c9688b19c8822e51af8e65268edd1db7095..d1d8a6d05addf306fb4ddb53999f49f5f0ecfc86 100644
--- a/chrome/browser/extensions/extension_management_api.cc
+++ b/chrome/browser/extensions/extension_management_api.cc
@@ -424,7 +424,7 @@ void ExtensionManagementEventRouter::Init() {
for (size_t i = 0; i < arraysize(types); i++) {
registrar_.Add(this,
types[i],
- NotificationService::AllSources());
+ Source<Profile>(profile_));
}
}
@@ -435,9 +435,7 @@ void ExtensionManagementEventRouter::Observe(
const char* event_name = NULL;
Profile* profile = Source<Profile>(source).ptr();
CHECK(profile);
- if (!profile_->IsSameProfile(profile)) {
- return;
- }
+ CHECK(profile_->IsSameProfile(profile));
switch (type) {
case chrome::NOTIFICATION_EXTENSION_INSTALLED:

Powered by Google App Engine
This is Rietveld 408576698