| Index: content/browser/memory/memory_coordinator_impl.h
|
| diff --git a/content/browser/memory/memory_coordinator_impl.h b/content/browser/memory/memory_coordinator_impl.h
|
| index b63bc4faac41250c42ffc8517868815ffd53a871..34cf572194833f984428ff7d74502d1895132b40 100644
|
| --- a/content/browser/memory/memory_coordinator_impl.h
|
| +++ b/content/browser/memory/memory_coordinator_impl.h
|
| @@ -28,6 +28,7 @@ class MemoryCoordinatorHandleImpl;
|
| class MemoryCoordinatorImplTest;
|
| class MemoryMonitor;
|
| class MemoryStateUpdater;
|
| +class RenderProcessHost;
|
| struct MemoryCoordinatorSingletonTraits;
|
|
|
| // MemoryCoordinatorImpl is an implementation of MemoryCoordinator.
|
| @@ -96,6 +97,16 @@ class CONTENT_EXPORT MemoryCoordinatorImpl : public NotificationObserver,
|
| bool ChangeStateIfNeeded(MemoryState prev_state, MemoryState next_state);
|
|
|
| protected:
|
| + // Returns the RenderProcessHost which is correspond to the given id.
|
| + // Returns nullptr if there is no corresponding RenderProcessHost.
|
| + // This is a virtual method so that we can write tests without having
|
| + // actual RenderProcessHost.
|
| + virtual RenderProcessHost* GetRenderProcessHost(int render_process_id);
|
| +
|
| + // Sets a delegate for testing.
|
| + void SetDelegateForTesting(
|
| + std::unique_ptr<MemoryCoordinatorDelegate> delegate);
|
| +
|
| // Adds the given ChildMemoryCoordinator as a child of this coordinator.
|
| void AddChildForTesting(int dummy_render_process_id,
|
| mojom::ChildMemoryCoordinatorPtr child);
|
| @@ -148,9 +159,6 @@ class CONTENT_EXPORT MemoryCoordinatorImpl : public NotificationObserver,
|
| MemoryState OverrideGlobalState(MemoryState memroy_state,
|
| const ChildInfo& child);
|
|
|
| - void SetDelegateForTesting(
|
| - std::unique_ptr<MemoryCoordinatorDelegate> delegate);
|
| -
|
| // Helper function of CreateHandle and AddChildForTesting.
|
| void CreateChildInfoMapEntry(
|
| int render_process_id,
|
|
|