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); |