| Index: chrome/browser/ui/webui/inspect_ui.cc
|
| diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
|
| index 0a778c0dce8b2358f418edac63ec018b028dd40c..a7e344202f09520699e43280c3765268961427e9 100644
|
| --- a/chrome/browser/ui/webui/inspect_ui.cc
|
| +++ b/chrome/browser/ui/webui/inspect_ui.cc
|
| @@ -326,8 +326,12 @@ void InspectUI::StartListeningNotifications() {
|
| DevToolsTargetsUIHandler::CreateForRenderers(callback));
|
| AddTargetUIHandler(
|
| DevToolsTargetsUIHandler::CreateForWorkers(callback));
|
| - AddTargetUIHandler(
|
| - DevToolsTargetsUIHandler::CreateForAdb(callback, profile));
|
| + if (profile->IsOffTheRecord()) {
|
| + ShowIncognitoWarning();
|
| + } else {
|
| + AddTargetUIHandler(
|
| + DevToolsTargetsUIHandler::CreateForAdb(callback, profile));
|
| + }
|
|
|
| port_status_serializer_.reset(
|
| new PortForwardingStatusSerializer(
|
| @@ -483,3 +487,7 @@ void InspectUI::PopulateTargets(const std::string& source,
|
| void InspectUI::PopulatePortStatus(const base::Value& status) {
|
| web_ui()->CallJavascriptFunction("populatePortStatus", status);
|
| }
|
| +
|
| +void InspectUI::ShowIncognitoWarning() {
|
| + web_ui()->CallJavascriptFunction("showIncognitoWarning");
|
| +}
|
|
|