forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This class added an unnecessary layer of complexity to access memory instrumentation functionality. Follow-up: Rename //services/resource_coordinator/ to //services/memory_instrumentation and remove "memory_instrumentation" subdirectories. Change-Id: I556423d2004ab0d2b2462ae5b0cac529712d50de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593829 Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Erik Chen <[email protected]> Reviewed-by: ssid <[email protected]> Commit-Queue: Erik Chen <[email protected]> Auto-Submit: François Doray <[email protected]> Cr-Commit-Position: refs/heads/master@{#840316}
- Loading branch information
Showing
16 changed files
with
74 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
services/resource_coordinator/public/cpp/memory_instrumentation/registry.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2020 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_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_INSTRUMENTATION_REGISTRY_H_ | ||
#define SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_INSTRUMENTATION_REGISTRY_H_ | ||
|
||
#include <string> | ||
|
||
#include "base/component_export.h" | ||
#include "base/optional.h" | ||
#include "base/process/process_handle.h" | ||
#include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h" | ||
|
||
namespace memory_instrumentation { | ||
|
||
// Interface to register client processes and heap profilers with the memory | ||
// instrumentation coordinator. This is considered privileged and the browser | ||
// should be the only client. | ||
class COMPONENT_EXPORT( | ||
RESOURCE_COORDINATOR_PUBLIC_MEMORY_INSTRUMENTATION) Registry { | ||
public: | ||
virtual ~Registry() = default; | ||
|
||
virtual void RegisterHeapProfiler( | ||
mojo::PendingRemote<mojom::HeapProfiler> profiler, | ||
mojo::PendingReceiver<mojom::HeapProfilerHelper> helper_receiver) = 0; | ||
|
||
// Must be called once for each client process, including the browser process. | ||
// |client_process| is an endpoint the service can use to push client events | ||
// to the process. |process_type|, |process_id| and |service_name| are | ||
// considered to be authoritative information about the client process | ||
// (verified by the browser process). | ||
virtual void RegisterClientProcess( | ||
mojo::PendingReceiver<mojom::Coordinator> receiver, | ||
mojo::PendingRemote<mojom::ClientProcess> client_process, | ||
mojom::ProcessType process_type, | ||
base::ProcessId process_id, | ||
const base::Optional<std::string>& service_name) = 0; | ||
}; | ||
|
||
} // namespace memory_instrumentation | ||
|
||
#endif // SERVICES_RESOURCE_COORDINATOR_PUBLIC_CPP_MEMORY_INSTRUMENTATION_REGISTRY_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
services/resource_coordinator/public/mojom/resource_coordinator_service.mojom
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
services/resource_coordinator/resource_coordinator_service.cc
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
services/resource_coordinator/resource_coordinator_service.h
This file was deleted.
Oops, something went wrong.