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

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

Issue 2734193002: memory-infra: Finish moving to Mojo (2nd attempt) (Closed)
Patch Set: rebase 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: services/resource_coordinator/memory/coordinator/coordinator_impl.h
diff --git a/services/resource_coordinator/memory/coordinator/coordinator_impl.h b/services/resource_coordinator/memory/coordinator/coordinator_impl.h
index 7a8e1dcd4b7823a701f5ba57d2981900a49b6a83..670a673d6d98f1e8ad9caa1f7b6b69666e2426df 100644
--- a/services/resource_coordinator/memory/coordinator/coordinator_impl.h
+++ b/services/resource_coordinator/memory/coordinator/coordinator_impl.h
@@ -9,7 +9,6 @@
#include <set>
#include <unordered_map>
-#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "base/trace_event/memory_dump_request_args.h"
@@ -27,9 +26,13 @@ class CoordinatorImpl : public Coordinator, public mojom::Coordinator {
// Coordinator
void BindCoordinatorRequest(mojom::CoordinatorRequest) override;
+ bool initialize_memory_dump_manager() const {
+ return initialize_memory_dump_manager_;
+ }
+
private:
- friend class CoordinatorImplTest; // For testing
- friend struct base::LazyInstanceTraitsBase<CoordinatorImpl>;
+ friend std::default_delete<CoordinatorImpl>; // For testing
+ friend class CoordinatorImplTest; // For testing
struct QueuedMemoryDumpRequest {
QueuedMemoryDumpRequest(const base::trace_event::MemoryDumpRequestArgs args,
@@ -39,7 +42,7 @@ class CoordinatorImpl : public Coordinator, public mojom::Coordinator {
const RequestGlobalMemoryDumpCallback callback;
};
- CoordinatorImpl();
+ CoordinatorImpl(bool initialize_memory_dump_manager);
~CoordinatorImpl() override;
// mojom::Coordinator
@@ -78,6 +81,8 @@ class CoordinatorImpl : public Coordinator, public mojom::Coordinator {
int failed_memory_dump_count_;
std::list<QueuedMemoryDumpRequest> queued_memory_dump_requests_;
+ const bool initialize_memory_dump_manager_;
+
base::ThreadChecker thread_checker_;
DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl);
« no previous file with comments | « services/resource_coordinator/BUILD.gn ('k') | services/resource_coordinator/memory/coordinator/coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698