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

Unified Diff: services/memory_instrumentation/coordinator_impl.h

Issue 2693063002: Renamed /services/memory_infrastructure to /services/resource_coordinator (Closed)
Patch Set: Review fix Created 3 years, 10 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
« no previous file with comments | « services/memory_instrumentation/OWNERS ('k') | services/memory_instrumentation/coordinator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/memory_instrumentation/coordinator_impl.h
diff --git a/services/memory_instrumentation/coordinator_impl.h b/services/memory_instrumentation/coordinator_impl.h
deleted file mode 100644
index ab76df10a45192349641cfc405eb448d6d9caeff..0000000000000000000000000000000000000000
--- a/services/memory_instrumentation/coordinator_impl.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_MEMORY_INSTRUMENTATION_COORDINATOR_IMPL_H_
-#define SERVICES_MEMORY_INSTRUMENTATION_COORDINATOR_IMPL_H_
-
-#include <list>
-#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"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/memory_instrumentation/public/cpp/coordinator.h"
-#include "services/memory_instrumentation/public/interfaces/memory_instrumentation.mojom.h"
-
-namespace memory_instrumentation {
-
-class CoordinatorImpl : public Coordinator, public mojom::Coordinator {
- public:
- static CoordinatorImpl* GetInstance();
-
- // Coordinator
- void BindCoordinatorRequest(mojom::CoordinatorRequest) override;
-
- private:
- friend class CoordinatorImplTest; // For testing
- friend struct base::DefaultLazyInstanceTraits<CoordinatorImpl>;
-
- struct QueuedMemoryDumpRequest {
- QueuedMemoryDumpRequest(
- const base::trace_event::MemoryDumpRequestArgs args,
- const RequestGlobalMemoryDumpCallback callback);
- ~QueuedMemoryDumpRequest();
- const base::trace_event::MemoryDumpRequestArgs args;
- const RequestGlobalMemoryDumpCallback callback;
- };
-
- CoordinatorImpl();
- ~CoordinatorImpl() override;
-
- // mojom::Coordinator
- void RegisterProcessLocalDumpManager(
- mojom::ProcessLocalDumpManagerPtr process_manager) override;
-
- // Broadcasts a dump request to all the process-local managers registered and
- // notifies when all of them have completed, or the global dump attempt
- // failed. This is in the mojom::Coordinator interface.
- void RequestGlobalMemoryDump(
- const base::trace_event::MemoryDumpRequestArgs& args,
- const RequestGlobalMemoryDumpCallback& callback) override;
-
- // Called when a process-local manager gets disconnected.
- void UnregisterProcessLocalDumpManager(
- mojom::ProcessLocalDumpManager* process_manager);
-
- // Callback of RequestProcessMemoryDump.
- void OnProcessMemoryDumpResponse(
- mojom::ProcessLocalDumpManager* process_manager,
- uint64_t dump_guid,
- bool success);
-
- void PerformNextQueuedGlobalMemoryDump();
- void FinalizeGlobalMemoryDumpIfAllManagersReplied();
-
- mojo::BindingSet<mojom::Coordinator> bindings_;
-
- // Registered ProcessLocalDumpManagers.
- std::unordered_map<mojom::ProcessLocalDumpManager*,
- mojom::ProcessLocalDumpManagerPtr> process_managers_;
-
- // Pending process managers for RequestGlobalMemoryDump.
- std::set<mojom::ProcessLocalDumpManager*> pending_process_managers_;
- int failed_memory_dump_count_;
- std::list<QueuedMemoryDumpRequest> queued_memory_dump_requests_;
-
- base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl);
-};
-
-} // namespace memory_instrumentation
-#endif // SERVICES_MEMORY_INFSTRUMENTATION_COORDINATOR_IMPL_H_
« no previous file with comments | « services/memory_instrumentation/OWNERS ('k') | services/memory_instrumentation/coordinator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698