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

Unified Diff: services/resource_coordinator/public/cpp/resource_coordinator_interface.cc

Issue 2964103002: [GRC] Decouple Render Process CPU Measurement from CU Graph (Closed)
Patch Set: Rebase Created 3 years, 6 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
Index: services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
diff --git a/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc b/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
index 7c76ac3c28d8070394b838df619a98c867895e30..304abb2008d89673b35600e6f29c19db95a3d717 100644
--- a/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
+++ b/services/resource_coordinator/public/cpp/resource_coordinator_interface.cc
@@ -101,4 +101,24 @@ void ResourceCoordinatorInterface::RemoveChildByID(
service_->RemoveChild(child_id);
}
+void ResourceCoordinatorInterface::SetProperty(
+ mojom::PropertyType property_type,
+ std::unique_ptr<base::Value> value) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ mojom::PropertyPtr property = mojom::Property::New();
+ property->property = property_type;
+ property->value = std::move(value);
+ service_->SetProperty(std::move(property));
+}
+
+void ResourceCoordinatorInterface::SetPropertyAndPropagate(
+ mojom::PropertyType property_type,
+ std::unique_ptr<base::Value> value) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ mojom::PropertyPtr property = mojom::Property::New();
+ property->property = property_type;
+ property->value = std::move(value);
+ service_->SetPropertyAndPropagate(std::move(property));
+}
+
} // namespace resource_coordinator

Powered by Google App Engine
This is Rietveld 408576698