| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "content/public/test/memory_coordinator_test_utils.h" | 5 #include "content/public/test/memory_coordinator_test_utils.h" |
| 6 | 6 |
| 7 #include "base/memory/memory_coordinator_proxy.h" | 7 #include "base/memory/memory_coordinator_proxy.h" |
| 8 #include "content/browser/memory/memory_coordinator_impl.h" | 8 #include "content/browser/memory/memory_coordinator_impl.h" |
| 9 #include "content/public/common/content_features.h" | 9 #include "content/public/common/content_features.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 void SetUpMemoryCoordinatorProxyForTesting() { | 13 void SetUpMemoryCoordinatorProxyForTesting() { |
| 14 base::MemoryCoordinatorProxy::GetInstance()-> | 14 // Make sure that MemoryCoordinatorImpl is initialized. |
| 15 SetGetCurrentMemoryStateCallback(base::Bind( | 15 MemoryCoordinatorImpl::GetInstance(); |
| 16 &MemoryCoordinatorImpl::GetCurrentMemoryState, | |
| 17 base::Unretained(MemoryCoordinatorImpl::GetInstance()))); | |
| 18 base::MemoryCoordinatorProxy::GetInstance()-> | |
| 19 SetSetCurrentMemoryStateForTestingCallback(base::Bind( | |
| 20 &MemoryCoordinatorImpl::SetCurrentMemoryStateForTesting, | |
| 21 base::Unretained(MemoryCoordinatorImpl::GetInstance()))); | |
| 22 } | 16 } |
| 23 | 17 |
| 24 } // namespace content | 18 } // namespace content |
| OLD | NEW |