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

Unified Diff: chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc

Issue 2921663003: GRC: Hook up process-level CoordinationUnits in the browser process (Closed)
Patch Set: Buildfix 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
diff --git a/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc b/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
index ec2c92e0e34f9cf113b1a7a7e7c5ffc3f2757c18..ad4ba289a915a18809f7c8cd246408e15e0ce2f0 100644
--- a/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
+++ b/chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc
@@ -6,6 +6,7 @@
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/common/service_manager_connection.h"
#include "services/resource_coordinator/public/cpp/resource_coordinator_features.h"
@@ -44,7 +45,14 @@ void ResourceCoordinatorWebContentsObserver::DidFinishNavigation(
return;
}
+ content::RenderFrameHost* render_frame_host =
+ navigation_handle->GetRenderFrameHost();
+
auto* frame_resource_coordinator =
- navigation_handle->GetRenderFrameHost()->GetFrameResourceCoordinator();
+ render_frame_host->GetFrameResourceCoordinator();
tab_resource_coordinator_->AddChild(*frame_resource_coordinator);
+
+ auto* process_resource_coordinator =
+ render_frame_host->GetProcess()->GetProcessResourceCoordinator();
+ process_resource_coordinator->AddChild(*frame_resource_coordinator);
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698