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

Unified Diff: services/resource_coordinator/memory/coordinator/coordinator_impl.cc

Issue 2777093009: [Memory UMA] Return a memory summary struct with the ack message (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
Index: services/resource_coordinator/memory/coordinator/coordinator_impl.cc
diff --git a/services/resource_coordinator/memory/coordinator/coordinator_impl.cc b/services/resource_coordinator/memory/coordinator/coordinator_impl.cc
index e3c2551159ce2a02926881f1d085aaeb804fd5d0..3f65716f9ae142d46cd6fc14206c038d124bfd24 100644
--- a/services/resource_coordinator/memory/coordinator/coordinator_impl.cc
+++ b/services/resource_coordinator/memory/coordinator/coordinator_impl.cc
@@ -122,7 +122,8 @@ void CoordinatorImpl::UnregisterProcessLocalDumpManager(
DCHECK(!queued_memory_dump_requests_.empty());
OnProcessMemoryDumpResponse(
process_manager, queued_memory_dump_requests_.front().args.dump_guid,
- false /* success */);
+ false /* success */,
+ base::Optional<base::trace_event::MemoryDumpCallbackResult>());
}
}
@@ -138,9 +139,9 @@ void CoordinatorImpl::PerformNextQueuedGlobalMemoryDump() {
failed_memory_dump_count_ = 0;
for (const auto& key_value : process_managers_) {
pending_process_managers_.insert(key_value.first);
- key_value.second->RequestProcessMemoryDump(
- args, base::Bind(&CoordinatorImpl::OnProcessMemoryDumpResponse,
- base::Unretained(this), key_value.first));
+ auto callback = base::Bind(&CoordinatorImpl::OnProcessMemoryDumpResponse,
+ base::Unretained(this), key_value.first);
+ key_value.second->RequestProcessMemoryDump(args, callback);
}
// Run the callback in case there are no process-local managers.
FinalizeGlobalMemoryDumpIfAllManagersReplied();
@@ -149,7 +150,8 @@ void CoordinatorImpl::PerformNextQueuedGlobalMemoryDump() {
void CoordinatorImpl::OnProcessMemoryDumpResponse(
mojom::ProcessLocalDumpManager* process_manager,
uint64_t dump_guid,
- bool success) {
+ bool success,
+ const base::Optional<base::trace_event::MemoryDumpCallbackResult>& result) {
auto it = pending_process_managers_.find(process_manager);
DCHECK(!queued_memory_dump_requests_.empty());

Powered by Google App Engine
This is Rietveld 408576698