summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 8edc24c..e53b97e 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();