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

Unified Diff: base/trace_event/memory_dump_manager.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/timer/timer.cc ('k') | base/trace_event/memory_dump_manager_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_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 50a7490f7c655560849b82fccb9d6f919d1c4a16..bced0557294ca90762ac20b8858dd867a83ae778 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -349,8 +349,9 @@ void MemoryDumpManager::RegisterDumpProviderInternal(
// after the OnTraceLogEnabled()
if (options.is_fast_polling_supported && dump_thread_) {
dump_thread_->task_runner()->PostTask(
- FROM_HERE, Bind(&MemoryDumpManager::RegisterPollingMDPOnDumpThread,
- Unretained(this), mdpinfo));
+ FROM_HERE,
+ BindOnce(&MemoryDumpManager::RegisterPollingMDPOnDumpThread,
+ Unretained(this), mdpinfo));
}
}
@@ -420,8 +421,9 @@ void MemoryDumpManager::UnregisterDumpProviderInternal(
if ((*mdp_iter)->options.is_fast_polling_supported && dump_thread_) {
DCHECK(take_mdp_ownership_and_delete_async);
dump_thread_->task_runner()->PostTask(
- FROM_HERE, Bind(&MemoryDumpManager::UnregisterPollingMDPOnDumpThread,
- Unretained(this), *mdp_iter));
+ FROM_HERE,
+ BindOnce(&MemoryDumpManager::UnregisterPollingMDPOnDumpThread,
+ Unretained(this), *mdp_iter));
}
// The MDPInfo instance can still be referenced by the
@@ -616,8 +618,8 @@ void MemoryDumpManager::SetupNextMemoryDump(
}
bool did_post_task = task_runner->PostTask(
- FROM_HERE, Bind(&MemoryDumpManager::InvokeOnMemoryDump, Unretained(this),
- Unretained(pmd_async_state.get())));
+ FROM_HERE, BindOnce(&MemoryDumpManager::InvokeOnMemoryDump,
+ Unretained(this), Unretained(pmd_async_state.get())));
if (did_post_task) {
// Ownership is tranferred to InvokeOnMemoryDump().
@@ -761,8 +763,8 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace(
scoped_refptr<SingleThreadTaskRunner> callback_task_runner =
pmd_async_state->callback_task_runner;
callback_task_runner->PostTask(
- FROM_HERE, Bind(&MemoryDumpManager::FinalizeDumpAndAddToTrace,
- Passed(&pmd_async_state)));
+ FROM_HERE, BindOnce(&MemoryDumpManager::FinalizeDumpAndAddToTrace,
+ Passed(&pmd_async_state)));
return;
}
« no previous file with comments | « base/timer/timer.cc ('k') | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698