Chromium Code Reviews| 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. |