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

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

Issue 11226037: Incognito-allowed package apps produce duplicate items in context menu (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: BrowserTest Added Created 8 years, 2 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_process_manager.cc
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 6a2a88f720126915fbdb8b8eb973fe0726d4bbe3..d7b4a3cb8b69286d7384d34b83343553cf8535ce 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -622,6 +622,13 @@ void ExtensionProcessManager::Observe(
}
case chrome::NOTIFICATION_PROFILE_DESTROYED: {
+ // Remove "incognito" "split" mode context menu items.
+ Profile* profile = content::Source<Profile>(source).ptr();
Yoyo Zhou 2012/10/29 21:26:51 Note that only the incognito profile's ExtensionPr
+ if (profile->IsOffTheRecord()) {
+ ExtensionService* service =
+ extensions::ExtensionSystem::Get(profile)->extension_service();
+ service->menu_manager()->RemoveAllIncognitoContextItems();
+ }
// Close background hosts when the last browser is closed so that they
// have time to shutdown various objects on different threads. Our
// destructor is called too late in the shutdown sequence.
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_browsertest.cc ('k') | chrome/browser/extensions/menu_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698