New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 775691 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug



Sign in to add a comment

Make coordination unit strongly typing

Project Member Reported by l...@chromium.org, Oct 17 2017

Issue description

This is a tracking bug to make coordination unit strongly typing. By saying strongly typing, we mean:

1. coordination unit will implement its own mojo interface;
2. mojo interface will have concrete API for manipulating coordination unit and sending signals;
3. public API for browser and blink will make the similar changes;
4. the relationship between coordination unit are explicitly encoded inside implementation.
 
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/874f51b4f2c1e85dec2ff8fd31c712c0d052723d

commit 874f51b4f2c1e85dec2ff8fd31c712c0d052723d
Author: Peiyong Lin <lpy@chromium.org>
Date: Wed Oct 18 00:53:09 2017

[ResourceCoordinator] Remove unused APIs in CoordinationUnitGraphObserver.

Previously when the parent-child relationship is changed in
CoordinationUnit graph, the coordination unit will notify the observers.
However, there's no need to do that beucase:
1. we can query the relationship from coordination unit;
2. observer is not supposed to maintain or bookkeep such information.

BUG=775691

Change-Id: I0dfcb7df699b39984e0304558d79cd878c497a67
Reviewed-on: https://chromium-review.googlesource.com/724210
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509634}
[modify] https://crrev.com/874f51b4f2c1e85dec2ff8fd31c712c0d052723d/services/resource_coordinator/coordination_unit/coordination_unit_base.cc
[modify] https://crrev.com/874f51b4f2c1e85dec2ff8fd31c712c0d052723d/services/resource_coordinator/observers/coordination_unit_graph_observer.h
[modify] https://crrev.com/874f51b4f2c1e85dec2ff8fd31c712c0d052723d/services/resource_coordinator/observers/coordination_unit_graph_observer_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e96adc9299aaeb1535001b615075500f5965c50

commit 9e96adc9299aaeb1535001b615075500f5965c50
Author: Peiyong Lin <lpy@chromium.org>
Date: Thu Oct 19 04:45:00 2017

[ResourceCoordinator] Introduce mojo interface per coordination unit type.

This patch introduces mojo interface for each existing coordination unit,
defines and implements the APIs for sending signals to coordination unit.

This patch is part of the progress to make sure coordination unit in
resource_coordinator/ strongly typed.
See https://chromium-review.googlesource.com/c/chromium/src/+/719516
for a fully working prototype.

BUG=775691

Change-Id: I2677920f07dafe3334a09a945e0d4e19266de319
Reviewed-on: https://chromium-review.googlesource.com/724186
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509997}
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.cc
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h
[modify] https://crrev.com/9e96adc9299aaeb1535001b615075500f5965c50/services/resource_coordinator/public/interfaces/coordination_unit.mojom

Comment 4 by pkl@chromium.org, Oct 30 2017

Components: Internals>Mojo
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a3a84dca78ca22ceb6cb3be815373bcb8f50193

commit 8a3a84dca78ca22ceb6cb3be815373bcb8f50193
Author: Peiyong Lin <lpy@chromium.org>
Date: Mon Oct 30 22:48:14 2017

Make resource_coordinator/ strongly typed.

This patch:
1. Added CU relation manipulation methods in mojo interface and public APIs;
2. Created one type of *ResourceCoordinator for each coordination unit type;
3. Removed generic CoordinationUnit mojo interface and implementation;
4. Replaced every call of SetProperty and SendEvent with new public APIs;
5. Added more tests.

BUG=775691

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I10b5c6a5ce9d8f0fbe3c2c3afef4ee4da7da0757
Reviewed-on: https://chromium-review.googlesource.com/736036
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512654}
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/browser_child_process_watcher.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/browser_child_process_watcher.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/public/browser/render_frame_host.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/public/browser/render_process_host.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/public/test/mock_render_process_host.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/content/public/test/mock_render_process_host.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_base.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_base.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_base_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_introspector_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/coordination_unit/process_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/observers/coordination_unit_graph_observer_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/observers/metrics_collector_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/observers/tab_signal_generator_impl.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/observers/tab_signal_generator_impl_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/BUILD.gn
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/coordination_unit_id.h
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/frame_resource_coordinator.cc
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/frame_resource_coordinator.h
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/page_resource_coordinator.cc
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/page_resource_coordinator.h
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/process_resource_coordinator.cc
[add] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/process_resource_coordinator.h
[delete] https://crrev.com/7248fbb91cb22965fb1427b4e3bc416de7bfabb7/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/cpp/resource_coordinator_interface.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/interfaces/coordination_unit.mojom
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/public/interfaces/coordination_unit_provider.mojom
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/services/resource_coordinator/resource_coordinator_service_unittest.cc
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/core/loader/IdlenessDetector.cpp
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/modules/notifications/Notification.cpp
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/BUILD.gn
[delete] https://crrev.com/7248fbb91cb22965fb1427b4e3bc416de7bfabb7/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.cpp
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.cpp
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.h
[modify] https://crrev.com/8a3a84dca78ca22ceb6cb3be815373bcb8f50193/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049

commit 5d86ecd0d94e1561fd66206e3d98dde3ac9c2049
Author: lpy <lpy@chromium.org>
Date: Tue Oct 31 00:10:25 2017

Revert "Make resource_coordinator/ strongly typed."

This reverts commit 8a3a84dca78ca22ceb6cb3be815373bcb8f50193.

Reason for revert: Unit test failed in Linux Test, see https://luci-milo.appspot.com/buildbot/chromium.linux/Linux%20Tests/63991

Original change's description:
> Make resource_coordinator/ strongly typed.
> 
> This patch:
> 1. Added CU relation manipulation methods in mojo interface and public APIs;
> 2. Created one type of *ResourceCoordinator for each coordination unit type;
> 3. Removed generic CoordinationUnit mojo interface and implementation;
> 4. Replaced every call of SetProperty and SendEvent with new public APIs;
> 5. Added more tests.
> 
> BUG=775691
> 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: I10b5c6a5ce9d8f0fbe3c2c3afef4ee4da7da0757
> Reviewed-on: https://chromium-review.googlesource.com/736036
> Commit-Queue: lpy <lpy@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: oysteine <oysteine@chromium.org>
> Reviewed-by: Zhen Wang <zhenw@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#512654}

TBR=dcheng@chromium.org,kinuko@chromium.org,peter@chromium.org,zhenw@chromium.org,japhet@chromium.org,oysteine@chromium.org,lpy@chromium.org

Change-Id: I0ecfcf6fe272d6be9dacf022e9221db346294abd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 775691
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/745282
Reviewed-by: lpy <lpy@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512683}
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/browser_child_process_watcher.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/browser_child_process_watcher.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/public/browser/render_frame_host.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/public/browser/render_process_host.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/public/test/mock_render_process_host.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/content/public/test/mock_render_process_host.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_base.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_base.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_base_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_introspector_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/coordination_unit/process_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/observers/coordination_unit_graph_observer_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/observers/metrics_collector_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/observers/tab_signal_generator_impl.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/observers/tab_signal_generator_impl_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/cpp/BUILD.gn
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/cpp/coordination_unit_id.h
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/frame_resource_coordinator.cc
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/frame_resource_coordinator.h
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/page_resource_coordinator.cc
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/page_resource_coordinator.h
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/process_resource_coordinator.cc
[delete] https://crrev.com/8232f416077967da4c3e79a499ae31f7ac17f020/services/resource_coordinator/public/cpp/process_resource_coordinator.h
[add] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/cpp/resource_coordinator_interface.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/interfaces/coordination_unit.mojom
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/public/interfaces/coordination_unit_provider.mojom
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/services/resource_coordinator/resource_coordinator_service_unittest.cc
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/core/loader/IdlenessDetector.cpp
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/modules/notifications/Notification.cpp
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/BUILD.gn
[add] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.cpp
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.cpp
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.h
[modify] https://crrev.com/5d86ecd0d94e1561fd66206e3d98dde3ac9c2049/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0152131ae94a2217d99e243140ac35838c448a35

commit 0152131ae94a2217d99e243140ac35838c448a35
Author: Peiyong Lin <lpy@chromium.org>
Date: Tue Oct 31 10:32:37 2017

Reland "Make resource_coordinator/ strongly typed."

This is a reland of 8a3a84dca78ca22ceb6cb3be815373bcb8f50193
Original change's description:
> Make resource_coordinator/ strongly typed.
> 
> This patch:
> 1. Added CU relation manipulation methods in mojo interface and public APIs;
> 2. Created one type of *ResourceCoordinator for each coordination unit type;
> 3. Removed generic CoordinationUnit mojo interface and implementation;
> 4. Replaced every call of SetProperty and SendEvent with new public APIs;
> 5. Added more tests.
> 
> BUG=775691
> 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
> Change-Id: I10b5c6a5ce9d8f0fbe3c2c3afef4ee4da7da0757
> Reviewed-on: https://chromium-review.googlesource.com/736036
> Commit-Queue: lpy <lpy@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: oysteine <oysteine@chromium.org>
> Reviewed-by: Zhen Wang <zhenw@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#512654}

TBR=dcheng@chromium.org, oysteine@chromium.org, peter@chromium.org, zhenw@chromium.org 

Bug: 775691
Change-Id: I39a8879739c67e630ae8c8e6e92b939cc4acdfd5
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Reviewed-on: https://chromium-review.googlesource.com/745361
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512796}
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/browser_child_process_watcher.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/browser_child_process_watcher.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/chrome_browser_main_extra_parts_resource_coordinator.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/public/browser/render_frame_host.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/public/browser/render_process_host.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/public/test/mock_render_process_host.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/content/public/test/mock_render_process_host.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_base.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_base.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_base_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_introspector_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_provider_impl.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/coordination_unit_test_harness.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/mock_coordination_unit_graphs.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/coordination_unit/process_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/observers/coordination_unit_graph_observer_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/observers/metrics_collector_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/observers/tab_signal_generator_impl.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/observers/tab_signal_generator_impl_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/BUILD.gn
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/coordination_unit_id.h
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/frame_resource_coordinator.cc
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/frame_resource_coordinator.h
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/page_resource_coordinator.cc
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/page_resource_coordinator.h
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/process_resource_coordinator.cc
[add] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/process_resource_coordinator.h
[delete] https://crrev.com/67b070ec54eeb678dcbc4b954168226fe7cbe3b8/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/cpp/resource_coordinator_interface.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/interfaces/coordination_unit.mojom
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/public/interfaces/coordination_unit_provider.mojom
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/services/resource_coordinator/resource_coordinator_service_unittest.cc
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/core/loader/IdlenessDetector.cpp
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/modules/notifications/Notification.cpp
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/BUILD.gn
[delete] https://crrev.com/67b070ec54eeb678dcbc4b954168226fe7cbe3b8/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.cpp
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/BlinkResourceCoordinatorBase.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.cpp
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/RendererResourceCoordinator.h
[modify] https://crrev.com/0152131ae94a2217d99e243140ac35838c448a35/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/427710a71c7b9b4788e602973639106717e0273e

commit 427710a71c7b9b4788e602973639106717e0273e
Author: Peiyong Lin <lpy@chromium.org>
Date: Wed Nov 01 21:08:15 2017

[GRC] Replace TabSignalObserver generic APIs with concrete APIs.

As part of the progress to make GRC strongly typed, we also lean towards to
making output mojo interface strongly-typed when needed. This patch removes the
current two generic APIs from the mojo interface and creates two APIs that are
used by the current TabSignalObserver implementation.

BUG=775691

Change-Id: I3ddd06fc723dd63982be21ee39e5809305765751
Reviewed-on: https://chromium-review.googlesource.com/747962
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513269}
[modify] https://crrev.com/427710a71c7b9b4788e602973639106717e0273e/chrome/browser/resource_coordinator/tab_manager_grc_tab_signal_observer.cc
[modify] https://crrev.com/427710a71c7b9b4788e602973639106717e0273e/chrome/browser/resource_coordinator/tab_manager_grc_tab_signal_observer.h
[modify] https://crrev.com/427710a71c7b9b4788e602973639106717e0273e/chrome/browser/resource_coordinator/tab_manager_web_contents_data.h
[modify] https://crrev.com/427710a71c7b9b4788e602973639106717e0273e/services/resource_coordinator/observers/tab_signal_generator_impl.cc
[modify] https://crrev.com/427710a71c7b9b4788e602973639106717e0273e/services/resource_coordinator/public/interfaces/tab_signal.mojom

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/085c83e10a6c1d4173f81b6f707175a72fac145d

commit 085c83e10a6c1d4173f81b6f707175a72fac145d
Author: Peiyong Lin <lpy@chromium.org>
Date: Wed Nov 01 23:08:12 2017

[GRC] Remove propagation code.

Previously, properties like CPU usage and expected task queueing duration are
propagated to PageCU from ProcessCU. At first we wrote the code this way
because we thought it could avoid duplicate calculation when multiple
components need to access the same property. However, this adds extra
complexity and currently we don't have properties shared by multiple
components. Thus, this patch removes the code and replace it with simple getter
APIs in PageCU.

BUG=775691

Change-Id: I441b01a68e8407f044b8b81d7d0753b52a363bf4
Reviewed-on: https://chromium-review.googlesource.com/747881
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513312}
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/coordination_unit_base.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/coordination_unit_base.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/coordination_unit/process_coordination_unit_impl.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/coordination_unit_graph_observer.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/metrics_collector.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/tab_signal_generator_impl.cc
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/tab_signal_generator_impl.h
[modify] https://crrev.com/085c83e10a6c1d4173f81b6f707175a72fac145d/services/resource_coordinator/observers/tab_signal_generator_impl_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04e78cc68167f93852a0eb39d7b55337c36f1fd6

commit 04e78cc68167f93852a0eb39d7b55337c36f1fd6
Author: Peiyong Lin <lpy@chromium.org>
Date: Sat Nov 04 04:00:15 2017

[GRC] Rename tab_signal.mojom to page_signal.mojom.

To be consistent with the rest of the concept in resource_coordinator/, we need
to remove the concept 'tab'. This patch renames the current tab_signal.mojom to
page_signal.mojom, renames TabSignalGenerator to PageSignalGenerator, renames
TabSignalObserver to TabSignalReceiver; and replace the old name with the new
name in services/resource_coordinator/ and
chrome/browser/resource_coordinator/.

We eventually want to decouple this PageSignalReceiver from TabManager, see:
https://chromium-review.googlesource.com/c/chromium/src/+/752506.

BUG=775691

Change-Id: I053a9b30c9e082558a5016ac7b0cc5e8ca0df91c
Reviewed-on: https://chromium-review.googlesource.com/752123
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514027}
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/chrome/browser/BUILD.gn
[rename] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/chrome/browser/resource_coordinator/page_signal_receiver.cc
[add] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/chrome/browser/resource_coordinator/page_signal_receiver.h
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/chrome/browser/resource_coordinator/tab_manager.h
[delete] https://crrev.com/fa3b72fd45cc3e1e2d58765498432a0c28113612/chrome/browser/resource_coordinator/tab_manager_grc_tab_signal_observer.h
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/BUILD.gn
[rename] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/observers/page_signal_generator_impl.cc
[add] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/observers/page_signal_generator_impl.h
[rename] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/observers/page_signal_generator_impl_unittest.cc
[delete] https://crrev.com/fa3b72fd45cc3e1e2d58765498432a0c28113612/services/resource_coordinator/observers/tab_signal_generator_impl.h
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/public/interfaces/BUILD.gn
[add] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/public/interfaces/page_signal.mojom
[delete] https://crrev.com/fa3b72fd45cc3e1e2d58765498432a0c28113612/services/resource_coordinator/public/interfaces/tab_signal.mojom
[modify] https://crrev.com/04e78cc68167f93852a0eb39d7b55337c36f1fd6/services/resource_coordinator/resource_coordinator_service.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e18bee48912629864101f848bf841ce89532d56

commit 8e18bee48912629864101f848bf841ce89532d56
Author: Peiyong Lin <lpy@chromium.org>
Date: Tue Nov 07 00:10:04 2017

[GRC] Decouple PageSignalReceiver from TabManager.

Previously PageSignalReceiver depends on TabManager because it calls directly to
TabManager::WebContentsData and TabManager::TabStatsCollector. TabManager also
depends on PageSignalReceiver directly or indirectly. To make PageSignalReceiver
decoupled from TabManger, we need to introduce a layering that
PageSignalReceiver calls into but not part of TabManager.

Thus, this patch:

1. Decoupled PageSignalReceiver from TabManager by adding PageSignalObserver
API;
2. Add [Add|Remove]Observer APIs in PageSignalReceiver;
3. Implemented a TabManager::ResourceCoordinatorSignalObserver which implements
PageSignalObserver APIs.

BUG=775691

Change-Id: I8c111ed36bbdb39c69d3568e5f7396dcd01c4ad7
Reviewed-on: https://chromium-review.googlesource.com/752506
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514308}
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/BUILD.gn
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/page_signal_receiver.cc
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/page_signal_receiver.h
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/tab_manager.cc
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/tab_manager.h
[add] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/tab_manager_resource_coordinator_signal_observer.cc
[add] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/chrome/browser/resource_coordinator/tab_manager_resource_coordinator_signal_observer.h
[modify] https://crrev.com/8e18bee48912629864101f848bf841ce89532d56/services/resource_coordinator/observers/page_signal_generator_impl.h

Comment 12 by l...@chromium.org, Nov 7 2017

Cc: fmea...@chromium.org ducbui@google.com erikc...@chromium.org
 Issue 748728  has been merged into this issue.
Project Member

Comment 13 by bugdroid1@chromium.org, Nov 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c7dbec18f8ec23f6b146cd361016ee19db7732d

commit 6c7dbec18f8ec23f6b146cd361016ee19db7732d
Author: Peiyong Lin <lpy@chromium.org>
Date: Wed Nov 08 23:16:42 2017

[GRC] Fix resource_coordinator/ manifest.

Expose resource_coordinator::page_signal corretly through manifest. The entries
are wrong because we renamed tab_signal to page_signal. See the renaming patch:
https://chromium-review.googlesource.com/c/chromium/src/+/752123

BUG=775691

Change-Id: I397fb374cd96a77263857853482e3e05e31257b3
Reviewed-on: https://chromium-review.googlesource.com/758823
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514995}
[modify] https://crrev.com/6c7dbec18f8ec23f6b146cd361016ee19db7732d/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/6c7dbec18f8ec23f6b146cd361016ee19db7732d/services/resource_coordinator/manifest.json

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c99b03947d5967310529bb23f9420b5b298e0160

commit c99b03947d5967310529bb23f9420b5b298e0160
Author: Peiyong Lin <lpy@chromium.org>
Date: Thu Nov 09 01:46:55 2017

[GRC]Add global clock ResourceCoordinatorClock.

Previously when we need to simulate clock ticks in tests, we need each
indivisual components like PageCoordinationUnitImpl to carry its own tick
clock, and we have to create helper functions to set the clock properly among
different components. This is fragile and redudant. This patch introduces a
ResourceCoordinatorClock which provides 4 helper methods to manipulate clock in
testing across components.

There's also a recent patch adding timing functions to
chrome/browser/resource_coordinator:
https://chromium-review.googlesource.com/c/chromium/src/+/723674

BUG=775691

Change-Id: I05e5d1fd688aaa35c8d8abcc4707439f00d9c958
Reviewed-on: https://chromium-review.googlesource.com/756211
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515053}
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/BUILD.gn
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.cc
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/coordination_unit/page_coordination_unit_impl.h
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/observers/metrics_collector.h
[modify] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/observers/metrics_collector_unittest.cc
[add] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/resource_coordinator_clock.cc
[add] https://crrev.com/c99b03947d5967310529bb23f9420b5b298e0160/services/resource_coordinator/resource_coordinator_clock.h

Project Member

Comment 15 by bugdroid1@chromium.org, Nov 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f

commit 708cc3ae57db47eb5c91e1ff1d29c6a635273a3f
Author: Peiyong Lin <lpy@chromium.org>
Date: Fri Nov 10 00:18:21 2017

[GRC] Add last audible time to FrameCoordinationUnit.

This patch removes last audible time from MetricsCollector and adds an API in
FrameCoordinationUnit to return last audible time.

BUG=775691

Change-Id: I17b78285a9403bf85c0443420ed31c9110e5f9ef
Reviewed-on: https://chromium-review.googlesource.com/761836
Reviewed-by: Zhen Wang <zhenw@chromium.org>
Commit-Queue: lpy <lpy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515362}
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.cc
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl.h
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/coordination_unit/frame_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/coordination_unit/page_coordination_unit_impl_unittest.cc
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/observers/metrics_collector.cc
[modify] https://crrev.com/708cc3ae57db47eb5c91e1ff1d29c6a635273a3f/services/resource_coordinator/observers/metrics_collector.h

Comment 16 by l...@chromium.org, Dec 6 2017

Status: Fixed (was: Started)
Status: Assigned (was: Fixed)
hmm I was looking through warnings of -Wconversion as part of issue 588506 and there's quite a lot of implicit type conversion happening, maybe I am misunderstanding how this works.

I'm specifically looking at the SetProperty and GetProperty api e.g. defined here:

https://cs.chromium.org/chromium/src/services/resource_coordinator/coordination_unit/coordination_unit_base.cc?type=cs&sq=package:chromium&g=0&l=71

this takes a uint64_t but it's often used for values that are not uint64 e.g. here is a get that has an implicit cast to a bool:

https://cs.chromium.org/chromium/src/services/resource_coordinator/observers/page_signal_generator_impl.cc?l=403

I wonder if as part of this bug, the whole way in which GetProperty and SetProperty were being used was planning on changing e.g. you could use a templated version that understands and validates the types?

I'm planning to just land a checked_cast as part of my fixes, as otherwise -Wshorten-64-to-32 can't be turned on.

Sign in to add a comment