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

Side by Side Diff: services/resource_coordinator/memory/coordinator/coordinator_impl.cc

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" 5 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 29 matching lines...) Expand all
40 mojom::kServiceTracingProcessId); 40 mojom::kServiceTracingProcessId);
41 } 41 }
42 g_coordinator_impl = this; 42 g_coordinator_impl = this;
43 } 43 }
44 44
45 CoordinatorImpl::~CoordinatorImpl() { 45 CoordinatorImpl::~CoordinatorImpl() {
46 g_coordinator_impl = nullptr; 46 g_coordinator_impl = nullptr;
47 } 47 }
48 48
49 void CoordinatorImpl::BindCoordinatorRequest( 49 void CoordinatorImpl::BindCoordinatorRequest(
50 const service_manager::BindSourceInfo& source_info,
50 mojom::CoordinatorRequest request) { 51 mojom::CoordinatorRequest request) {
51 DCHECK(thread_checker_.CalledOnValidThread()); 52 DCHECK(thread_checker_.CalledOnValidThread());
52 bindings_.AddBinding(this, std::move(request)); 53 bindings_.AddBinding(this, std::move(request));
53 } 54 }
54 55
55 CoordinatorImpl::QueuedMemoryDumpRequest::QueuedMemoryDumpRequest( 56 CoordinatorImpl::QueuedMemoryDumpRequest::QueuedMemoryDumpRequest(
56 const base::trace_event::MemoryDumpRequestArgs args, 57 const base::trace_event::MemoryDumpRequestArgs args,
57 const RequestGlobalMemoryDumpCallback callback) 58 const RequestGlobalMemoryDumpCallback callback)
58 : args(args), callback(callback) {} 59 : args(args), callback(callback) {}
59 60
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Schedule the next queued dump (if applicable). 185 // Schedule the next queued dump (if applicable).
185 if (!queued_memory_dump_requests_.empty()) { 186 if (!queued_memory_dump_requests_.empty()) {
186 base::ThreadTaskRunnerHandle::Get()->PostTask( 187 base::ThreadTaskRunnerHandle::Get()->PostTask(
187 FROM_HERE, 188 FROM_HERE,
188 base::Bind(&CoordinatorImpl::PerformNextQueuedGlobalMemoryDump, 189 base::Bind(&CoordinatorImpl::PerformNextQueuedGlobalMemoryDump,
189 base::Unretained(this))); 190 base::Unretained(this)));
190 } 191 }
191 } 192 }
192 193
193 } // namespace memory_instrumentation 194 } // namespace memory_instrumentation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698