Commit 914d8bfc authored by kalman@chromium.org's avatar kalman@chromium.org

Make inspecting incognito extension background pages work again.

BUG=297856

Review URL: https://codereview.chromium.org/24460002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243699 0039d316-1c4b-4281-b951-d872f2087c98
parent b304306c
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment