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

Unified Diff: chrome/browser/browser.cc

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 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/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index c208fe4042333e666687053e297f47d2f470f9d1..bf31024a8b994bb727939f42e833305131d2a4e0 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -3052,13 +3052,14 @@ void Browser::Observe(NotificationType type,
case NotificationType::EXTENSION_UPDATE_DISABLED: {
// Show the UI if the extension was disabled for escalated permissions.
Profile* profile = Source<Profile>(source).ptr();
- DCHECK_EQ(profile_, profile);
- ExtensionsService* service = profile->GetExtensionsService();
- DCHECK(service);
- Extension* extension = Details<Extension>(details).ptr();
- if (service->extension_prefs()->DidExtensionEscalatePermissions(
- extension->id()))
- ShowExtensionDisabledUI(service, profile_, extension);
+ if (profile_->IsSameProfile(profile)) {
+ ExtensionsService* service = profile->GetExtensionsService();
+ DCHECK(service);
+ Extension* extension = Details<Extension>(details).ptr();
+ if (service->extension_prefs()->DidExtensionEscalatePermissions(
+ extension->id()))
+ ShowExtensionDisabledUI(service, profile_, extension);
+ }
break;
}

Powered by Google App Engine
This is Rietveld 408576698