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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h

Issue 2471153002: [scheduler] Use Finch to control background throttling. (Closed)
Patch Set: Fix test and address comments Created 4 years, 1 month 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
Index: third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
index 71b20b2870331dad0b096ae02f3a40007e87d0f1..7e089a11bb383f7ec7c944ad12efeed8f04729c9 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.h
@@ -202,7 +202,10 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
const scoped_refptr<TaskQueue>& task_runner() const { return task_runner_; }
// Returned object is owned by |TaskQueueThrottler|.
- TimeBudgetPool* CreateTimeBudgetPool(const char* name);
+ TimeBudgetPool* CreateTimeBudgetPool(
+ const char* name,
+ base::Optional<base::TimeDelta> max_budget_level,
+ base::Optional<base::TimeDelta> max_throttling_duration);
// Accounts for given task for cpu-based throttling needs.
void OnTaskRunTimeReported(TaskQueue* task_queue,
@@ -266,9 +269,6 @@ class BLINK_PLATFORM_EXPORT TaskQueueThrottler : public TimeDomain::Observer {
const char* tracing_category_; // NOT OWNED
std::unique_ptr<ThrottledTimeDomain> time_domain_;
- base::Optional<base::TimeDelta> max_budget_level_;
- base::Optional<base::TimeDelta> max_throttling_duration_;
-
CancelableClosureHolder pump_throttled_tasks_closure_;
base::Optional<base::TimeTicks> pending_pump_throttled_tasks_runtime_;
bool allow_throttling_;

Powered by Google App Engine
This is Rietveld 408576698