Commit c52e741c authored by Fadi Meawad's avatar Fadi Meawad Committed by Commit Bot

[Tracing] Add process label for SubFrames in tracing

With the addition of site isolation, we now can have render
processes that are not assigned to a top level page, hence
they do not get a descriptive title in tracing.

This CL adds information about all the hosted subframes to
the process label in tracing.

Bug: chromium:828072
Change-Id: Ia6f617dc936f0c92183684faee39c65447bfd37c
Reviewed-on: https://chromium-review.googlesource.com/990553Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Fadi Meawad <fmeawad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547700}
parent 02de1dcf
...@@ -4427,6 +4427,17 @@ void RenderFrameImpl::DidReceiveTitle(const blink::WebString& title, ...@@ -4427,6 +4427,17 @@ void RenderFrameImpl::DidReceiveTitle(const blink::WebString& title,
base::string16 shortened_title = title16.substr(0, kMaxTitleChars); base::string16 shortened_title = title16.substr(0, kMaxTitleChars);
Send(new FrameHostMsg_UpdateTitle(routing_id_, Send(new FrameHostMsg_UpdateTitle(routing_id_,
shortened_title, direction)); shortened_title, direction));
} else {
// Set process title for sub-frames in traces.
GURL loading_url = GetLoadingUrl();
if (!loading_url.host().empty() &&
loading_url.scheme() != url::kFileScheme) {
std::string subframe_title = "Subframe: " + loading_url.scheme() +
url::kStandardSchemeSeparator +
loading_url.host();
base::trace_event::TraceLog::GetInstance()->UpdateProcessLabel(
routing_id_, subframe_title);
}
} }
// Also check whether we have new encoding name. // Also check whether we have new encoding name.
......
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