Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
index 8edc24c8612e603fad4155bf8d51a2f8f1aa274f..e53b97e6abd507c0dcc07ab3e4964bd8a5f31733 100644 |
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
@@ -796,8 +796,10 @@ void ExtensionSettingsHandler::HandleInspectMessage( |
const Extension* extension = |
extension_service_->extensions()->GetByID(extension_id); |
DCHECK(extension); |
- devtools_util::InspectBackgroundPage(extension, |
- Profile::FromWebUI(web_ui())); |
+ Profile* profile = Profile::FromWebUI(web_ui()); |
+ if (incognito) |
+ profile = profile->GetOffTheRecordProfile(); |
+ devtools_util::InspectBackgroundPage(extension, profile); |
return; |
} |
@@ -1134,7 +1136,8 @@ ExtensionSettingsHandler::GetInspectablePagesForExtension( |
// Repeat for the incognito process, if applicable. Don't try to get |
// shell windows for incognito processes. |
if (extension_service_->profile()->HasOffTheRecordProfile() && |
- IncognitoInfo::IsSplitMode(extension)) { |
+ IncognitoInfo::IsSplitMode(extension) && |
+ extension_util::IsIncognitoEnabled(extension->id(), extension_service_)) { |
extensions::ProcessManager* process_manager = |
ExtensionSystem::Get(extension_service_->profile()-> |
GetOffTheRecordProfile())->process_manager(); |