| Index: athena/test/test_resource_manager_delegate.cc
|
| diff --git a/athena/test/test_resource_manager_delegate.cc b/athena/test/test_resource_manager_delegate.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a38b4db56ffd58fbd6ac72c5c9e978e801bcdd1a
|
| --- /dev/null
|
| +++ b/athena/test/test_resource_manager_delegate.cc
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2014 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 "athena/resource_manager/public/resource_manager_delegate.h"
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/macros.h"
|
| +
|
| +namespace athena {
|
| +
|
| +namespace test {
|
| +
|
| +namespace {
|
| +// This is the minimum amount of time in milliseconds between checks for
|
| +// low memory. Since this implementation does not have any changes to the
|
| +// amount of memory we can use a big value here.
|
| +const int kMemoryPressureIntervalMs = 1000;
|
| +} // namespace
|
| +
|
| +class ResourceManagerDelegateImpl : public ResourceManagerDelegate {
|
| + public:
|
| + ResourceManagerDelegateImpl() {}
|
| + virtual ~ResourceManagerDelegateImpl() {}
|
| +
|
| + private:
|
| + virtual int GetUsedMemoryInPercent() OVERRIDE {
|
| + return 0;
|
| + }
|
| +
|
| + virtual int MemoryPressureIntervalInMS() OVERRIDE {
|
| + return kMemoryPressureIntervalMs;
|
| + }
|
| + DISALLOW_COPY_AND_ASSIGN(ResourceManagerDelegateImpl);
|
| +};
|
| +
|
| +} // namespace test
|
| +
|
| +// static
|
| +ResourceManagerDelegate*
|
| +ResourceManagerDelegate::CreateResourceManagerDelegate() {
|
| + return new test::ResourceManagerDelegateImpl;
|
| +}
|
| +
|
| +} // namespace athena
|
|
|