| Index: base/memory/memory_coordinator_proxy.cc
|
| diff --git a/base/memory/memory_coordinator_proxy.cc b/base/memory/memory_coordinator_proxy.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7e8527504102864bc63ca70631b8ca77699cb22b
|
| --- /dev/null
|
| +++ b/base/memory/memory_coordinator_proxy.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#include "base/memory/memory_coordinator_proxy.h"
|
| +
|
| +namespace base {
|
| +
|
| +MemoryCoordinatorProxy::MemoryCoordinatorProxy() {
|
| +}
|
| +
|
| +MemoryCoordinatorProxy::~MemoryCoordinatorProxy() {
|
| +}
|
| +
|
| +MemoryCoordinatorProxy* MemoryCoordinatorProxy::GetInstance() {
|
| + return Singleton<base::MemoryCoordinatorProxy>::get();
|
| +}
|
| +
|
| +MemoryState MemoryCoordinatorProxy::GetCurrentMemoryState() const {
|
| + if (!callback_)
|
| + return MemoryState::NORMAL;
|
| + return callback_.Run();
|
| +}
|
| +
|
| +void MemoryCoordinatorProxy::SetGetCurrentMemoryStateCallback(
|
| + GetCurrentMemoryStateCallback callback) {
|
| + callback_ = callback;
|
| +}
|
| +
|
| +} // namespace base
|
|
|