Plumb Task Scheduler Histograms to the Task Scheduler Internals Page
This sets up the plumbing to get data from the Task Scheduler to the
internals page. The first target are some selected histograms.
BUG=553459
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://chromiumcodereview.appspot.com/2420973002
Cr-Commit-Position: refs/heads/master@{#426520}
diff --git a/base/task_scheduler/task_scheduler.h b/base/task_scheduler/task_scheduler.h
index 91a608ec7..fe3d5e53 100644
--- a/base/task_scheduler/task_scheduler.h
+++ b/base/task_scheduler/task_scheduler.h
@@ -20,6 +20,7 @@
namespace base {
+class HistogramBase;
class SchedulerWorkerPoolParams;
// Interface for a task scheduler and static methods to manage the instance used
@@ -48,6 +49,9 @@
const TaskTraits& traits,
ExecutionMode execution_mode) = 0;
+ // Returns a vector of all histograms available in this task scheduler.
+ virtual std::vector<const HistogramBase*> GetHistograms() const = 0;
+
// Synchronously shuts down the scheduler. Once this is called, only tasks
// posted with the BLOCK_SHUTDOWN behavior will be run. When this returns:
// - All SKIP_ON_SHUTDOWN tasks that were already running have completed their