Commit c6d9db62 authored by erikchen's avatar erikchen Committed by Commit Bot

Only report root frames in GetProcessToURLMap.

This allows the memory-infra UKMs to correctly report the URL of the root frame
for each process, since there is no way to report multiple URLs [for child
frames].

Bug: 730783
Change-Id: I342b3a76d543c8f9e4b0e2edc34f88d331e8b4e1
Reviewed-on: https://chromium-review.googlesource.com/601164
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: default avatarOystein Eftevaag <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491904}
parent 1441b968
......@@ -8,6 +8,7 @@
#include "base/process/process_handle.h"
#include "services/resource_coordinator/coordination_unit/coordination_unit_impl.h"
#include "services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h"
namespace resource_coordinator {
......@@ -33,6 +34,10 @@ void CoordinationUnitIntrospectorImpl::GetProcessToURLMap(
process_cu->GetAssociatedCoordinationUnitsOfType(
CoordinationUnitType::kFrame);
for (CoordinationUnitImpl* frame_cu : frame_cus) {
if (!CoordinationUnitImpl::ToFrameCoordinationUnit(frame_cu)
->IsMainFrame()) {
continue;
}
base::Value url_value = frame_cu->GetProperty(
resource_coordinator::mojom::PropertyType::kURL);
if (url_value.is_string()) {
......
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