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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/child/idle_helper.cc

Issue 2416803003: Record PendingTaskCount when a backgrounded renderer is suspended. (Closed)
Patch Set: Add unittest Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/scheduler/child/idle_helper.h" 5 #include "platform/scheduler/child/idle_helper.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "platform/scheduler/base/real_time_domain.h" 10 #include "platform/scheduler/base/real_time_domain.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 case IdlePeriodState::IN_LONG_IDLE_PERIOD_WITH_MAX_DEADLINE: 465 case IdlePeriodState::IN_LONG_IDLE_PERIOD_WITH_MAX_DEADLINE:
466 return "in_long_idle_period_with_max_deadline"; 466 return "in_long_idle_period_with_max_deadline";
467 case IdlePeriodState::IN_LONG_IDLE_PERIOD_PAUSED: 467 case IdlePeriodState::IN_LONG_IDLE_PERIOD_PAUSED:
468 return "in_long_idle_period_paused"; 468 return "in_long_idle_period_paused";
469 default: 469 default:
470 NOTREACHED(); 470 NOTREACHED();
471 return nullptr; 471 return nullptr;
472 } 472 }
473 } 473 }
474 474
475 int IdleHelper::GetNumberOfPendingIdleTasks() {
476 return idle_queue_->GetNumberOfPendingTasks();
477 }
478
475 } // namespace scheduler 479 } // namespace scheduler
476 } // namespace blink 480 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698