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

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: Created 3 years, 9 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: 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 6ed1ca8fff3aa55d94af524a1a0e0057183b02ac..d44ec0b75bde71dd05b82362162e7ba66fb9cf6b 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -341,8 +341,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));
}
}
@@ -412,8 +413,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
@@ -608,8 +610,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().
@@ -753,8 +755,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;
}

Powered by Google App Engine
This is Rietveld 408576698