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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 24460002: Make inspecting incognito extension background pages work again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698