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

Unified Diff: chrome/browser/ui/browser.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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 66990b19eabdc543c08b2798849d14e905f76b8a..422b95c2983a7fd2c68f004bdb9060865a876ed8 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -273,13 +273,13 @@ Browser::Browser(Type type, Profile* profile)
registrar_.Add(this, content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
- NotificationService::AllSources());
+ Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
- NotificationService::AllSources());
+ Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
- NotificationService::AllSources());
+ Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
NotificationService::AllSources());
registrar_.Add(
@@ -3920,7 +3920,8 @@ void Browser::Observe(int type,
}
case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
- if (window()->GetLocationBar())
+ Profile* profile = Source<Profile>(source).ptr();
+ if (profile_->IsSameProfile(profile) && window()->GetLocationBar())
jstritar 2011/08/30 15:06:31 I think this can come from an incognito profile, s
window()->GetLocationBar()->InvalidatePageActions();
break;
}
« no previous file with comments | « chrome/browser/extensions/extension_management_api.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698