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

Unified Diff: components/scheduler/renderer/throttling_helper.h

Issue 2184123002: Change VirtualTimePolicy::PAUSE_IF_NETWORK_FETCHES_PENDING (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/scheduler/renderer/throttling_helper.h
diff --git a/components/scheduler/renderer/throttling_helper.h b/components/scheduler/renderer/throttling_helper.h
index db995aea8c27c1054bf10a21bf6deb1efad9bb03..d2b34c208a06081a42af5330332c25e07bd0b5a3 100644
--- a/components/scheduler/renderer/throttling_helper.h
+++ b/components/scheduler/renderer/throttling_helper.h
@@ -50,6 +50,10 @@ class SCHEDULER_EXPORT ThrottlingHelper : public TimeDomain::Observer {
// Removes |task_queue| from |throttled_queues_|.
void UnregisterTaskQueue(TaskQueue* task_queue);
+ // Tells the ThrottlingHelper we're using virtual time, which disables all
+ // throttling.
+ void EnableVirtualTime();
+
const ThrottledTimeDomain* time_domain() const { return time_domain_.get(); }
static base::TimeTicks ThrottledRunTime(base::TimeTicks unthrottled_runtime);
@@ -86,8 +90,9 @@ class SCHEDULER_EXPORT ThrottlingHelper : public TimeDomain::Observer {
const char* tracing_category_; // NOT OWNED
std::unique_ptr<ThrottledTimeDomain> time_domain_;
- CancelableClosureHolder suspend_timers_when_backgrounded_closure_;
+ CancelableClosureHolder pump_throttled_tasks_closure_;
base::TimeTicks pending_pump_throttled_tasks_runtime_;
+ bool virtual_time_;
base::WeakPtrFactory<ThrottlingHelper> weak_factory_;
« no previous file with comments | « components/scheduler/renderer/renderer_scheduler_impl_unittest.cc ('k') | components/scheduler/renderer/throttling_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698