Distinguish between normal and extension renderers while recording thread load metrics.
The Blink Renderer Scheduler uses ThreadLoadTracker instances to measure main
thread load for backgrounded and foregrounded renderers. It's useful to measure
the same for extension renderer processes as well, to study how they contrast
with normal renderers. But currently, the content layer doesn't have the
information to determine if the current renderer process is an extension
renderer.
This CL plumbs this information through the RenderThread, which owns the
RendererScheduler. The renderer process type is passed as an enum to the
RendererScheduler, which logs UMA for the same.
BUG=719102
Change-Id: Ie288a7cab42f3605c829928cf298e23955db85ed
Reviewed-on: https://chromium-review.googlesource.com/590964
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Mark Pearson <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Commit-Queue: Karan Bhatia <[email protected]>
Cr-Commit-Position: refs/heads/master@{#493204}
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 2649e89c..30489e0 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -227,6 +227,8 @@
int32_t GetClientId() override;
scoped_refptr<base::SingleThreadTaskRunner> GetTimerTaskRunner() override;
scoped_refptr<base::SingleThreadTaskRunner> GetLoadingTaskRunner() override;
+ void SetRendererProcessType(
+ blink::scheduler::RendererProcessType type) override;
// IPC::Listener implementation via ChildThreadImpl:
void OnAssociatedInterfaceRequest(