Commit 03c55b23 authored by Hajime Hoshi's avatar Hajime Hoshi Committed by Commit Bot

Remove Timer usages from OomInterventionImpl

This is part of efforts to replace default timer task runners with
other appropriate task runners in the renderer.

Note that this CL adds a usage of default timer task queue via WebThread
::GetTaskRunner(), but I think this is inevitable.

Bug: 624694, 804694
Change-Id: I3a18dc9908850096050de16c66f3c78aa0e3c666
Reviewed-on: https://chromium-review.googlesource.com/923833Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537293}
parent 70658191
...@@ -47,7 +47,9 @@ void OomInterventionImpl::Create(mojom::blink::OomInterventionRequest request) { ...@@ -47,7 +47,9 @@ void OomInterventionImpl::Create(mojom::blink::OomInterventionRequest request) {
OomInterventionImpl::OomInterventionImpl( OomInterventionImpl::OomInterventionImpl(
MemoryWorkloadCaculator workload_calculator) MemoryWorkloadCaculator workload_calculator)
: workload_calculator_(std::move(workload_calculator)), : workload_calculator_(std::move(workload_calculator)),
timer_(this, &OomInterventionImpl::Check) { timer_(Platform::Current()->MainThread()->GetTaskRunner(),
this,
&OomInterventionImpl::Check) {
DCHECK(workload_calculator_); DCHECK(workload_calculator_);
} }
......
...@@ -41,7 +41,7 @@ class CONTROLLER_EXPORT OomInterventionImpl ...@@ -41,7 +41,7 @@ class CONTROLLER_EXPORT OomInterventionImpl
MemoryWorkloadCaculator workload_calculator_; MemoryWorkloadCaculator workload_calculator_;
mojom::blink::OomInterventionHostPtr host_; mojom::blink::OomInterventionHostPtr host_;
bool trigger_intervention_ = false; bool trigger_intervention_ = false;
Timer<OomInterventionImpl> timer_; TaskRunnerTimer<OomInterventionImpl> timer_;
std::unique_ptr<ScopedPagePauser> pauser_; std::unique_ptr<ScopedPagePauser> pauser_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment