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

Unified Diff: base/trace_event/memory_dump_scheduler.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/trace_category_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_scheduler.cc
diff --git a/base/trace_event/memory_dump_scheduler.cc b/base/trace_event/memory_dump_scheduler.cc
index 150feb8e791759681585c17318b05cc52ed639e7..91d70b78f9b7d3f79c6e8516faa1ec50850c87ff 100644
--- a/base/trace_event/memory_dump_scheduler.cc
+++ b/base/trace_event/memory_dump_scheduler.cc
@@ -105,8 +105,8 @@ void MemoryDumpScheduler::EnablePollingIfNeeded() {
polling_state_->ResetTotals();
polling_task_runner_->PostTask(
- FROM_HERE,
- Bind(&MemoryDumpScheduler::PollMemoryOnPollingThread, Unretained(this)));
+ FROM_HERE, BindOnce(&MemoryDumpScheduler::PollMemoryOnPollingThread,
+ Unretained(this)));
}
void MemoryDumpScheduler::NotifyDumpTriggered() {
@@ -114,7 +114,7 @@ void MemoryDumpScheduler::NotifyDumpTriggered() {
!polling_task_runner_->RunsTasksOnCurrentThread()) {
polling_task_runner_->PostTask(
FROM_HERE,
- Bind(&MemoryDumpScheduler::NotifyDumpTriggered, Unretained(this)));
+ BindOnce(&MemoryDumpScheduler::NotifyDumpTriggered, Unretained(this)));
return;
}
@@ -136,8 +136,8 @@ void MemoryDumpScheduler::DisableAllTriggers() {
if (polling_task_runner_) {
DCHECK(polling_state_);
polling_task_runner_->PostTask(
- FROM_HERE, Bind(&MemoryDumpScheduler::DisablePollingOnPollingThread,
- Unretained(this)));
+ FROM_HERE, BindOnce(&MemoryDumpScheduler::DisablePollingOnPollingThread,
+ Unretained(this)));
polling_task_runner_ = nullptr;
}
is_setup_ = false;
@@ -197,7 +197,8 @@ void MemoryDumpScheduler::PollMemoryOnPollingThread() {
// TODO(ssid): Use RequestSchedulerCallback, crbug.com/607533.
ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE,
- Bind(&MemoryDumpScheduler::PollMemoryOnPollingThread, Unretained(this)),
+ BindOnce(&MemoryDumpScheduler::PollMemoryOnPollingThread,
+ Unretained(this)),
TimeDelta::FromMilliseconds(polling_state_->polling_interval_ms));
}
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/trace_category_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698