Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / scheduler / renderer / renderer_scheduler.cc
blob70459bff292d69176ae2eb6c1043ab520b1f7c49
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/scheduler/renderer/renderer_scheduler.h"
7 #include "base/message_loop/message_loop.h"
8 #include "base/trace_event/trace_event.h"
9 #include "base/trace_event/trace_event_impl.h"
10 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h"
11 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
13 namespace scheduler {
15 RendererScheduler::RendererScheduler() {
18 RendererScheduler::~RendererScheduler() {
21 // static
22 scoped_ptr<RendererScheduler> RendererScheduler::Create() {
23 // Ensure worker.scheduler, worker.scheduler.debug and
24 // renderer.scheduler.debug appear as an option in about://tracing
25 base::trace_event::TraceLog::GetCategoryGroupEnabled(
26 TRACE_DISABLED_BY_DEFAULT("worker.scheduler"));
27 base::trace_event::TraceLog::GetCategoryGroupEnabled(
28 TRACE_DISABLED_BY_DEFAULT("worker.scheduler.debug"));
29 base::trace_event::TraceLog::GetCategoryGroupEnabled(
30 TRACE_DISABLED_BY_DEFAULT("renderer.scheduler.debug"));
32 base::MessageLoop* message_loop = base::MessageLoop::current();
33 return make_scoped_ptr(new RendererSchedulerImpl(
34 SchedulerTaskRunnerDelegateImpl::Create(message_loop)));
37 } // namespace scheduler