OLD | NEW |
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 #ifndef SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ | 5 #ifndef SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ |
6 #define SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ | 6 #define SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class CoordinatorImpl : public Coordinator, public mojom::Coordinator { | 23 class CoordinatorImpl : public Coordinator, public mojom::Coordinator { |
24 public: | 24 public: |
25 static CoordinatorImpl* GetInstance(); | 25 static CoordinatorImpl* GetInstance(); |
26 | 26 |
27 // Coordinator | 27 // Coordinator |
28 void BindCoordinatorRequest(mojom::CoordinatorRequest) override; | 28 void BindCoordinatorRequest(mojom::CoordinatorRequest) override; |
29 | 29 |
30 private: | 30 private: |
31 friend class CoordinatorImplTest; // For testing | 31 friend class CoordinatorImplTest; // For testing |
32 friend struct base::DefaultLazyInstanceTraits<CoordinatorImpl>; | 32 friend struct base::LazyInstanceTraitsBase<CoordinatorImpl>; |
33 | 33 |
34 struct QueuedMemoryDumpRequest { | 34 struct QueuedMemoryDumpRequest { |
35 QueuedMemoryDumpRequest(const base::trace_event::MemoryDumpRequestArgs args, | 35 QueuedMemoryDumpRequest(const base::trace_event::MemoryDumpRequestArgs args, |
36 const RequestGlobalMemoryDumpCallback callback); | 36 const RequestGlobalMemoryDumpCallback callback); |
37 ~QueuedMemoryDumpRequest(); | 37 ~QueuedMemoryDumpRequest(); |
38 const base::trace_event::MemoryDumpRequestArgs args; | 38 const base::trace_event::MemoryDumpRequestArgs args; |
39 const RequestGlobalMemoryDumpCallback callback; | 39 const RequestGlobalMemoryDumpCallback callback; |
40 }; | 40 }; |
41 | 41 |
42 CoordinatorImpl(); | 42 CoordinatorImpl(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int failed_memory_dump_count_; | 78 int failed_memory_dump_count_; |
79 std::list<QueuedMemoryDumpRequest> queued_memory_dump_requests_; | 79 std::list<QueuedMemoryDumpRequest> queued_memory_dump_requests_; |
80 | 80 |
81 base::ThreadChecker thread_checker_; | 81 base::ThreadChecker thread_checker_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl); | 83 DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace memory_instrumentation | 86 } // namespace memory_instrumentation |
87 #endif // SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ | 87 #endif // SERVICES_RESOURCE_COORDINATOR_MEMORY_COORDINATOR_COORDINATOR_IMPL_H_ |
OLD | NEW |