Reland Track the active ExtensionKeybindingRegistry and make it available to EventRew...
[chromium-blink-merge.git] / athena / test / test_resource_manager_delegate.cc
blob3c3880be830b4c0b69854ba2178655fa32716762
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/resource_manager/public/resource_manager_delegate.h"
7 #include <string>
9 #include "base/macros.h"
11 namespace athena {
13 namespace test {
15 namespace {
16 // This is the minimum amount of time in milliseconds between checks for
17 // low memory. Since we report no memory use (and the timeout is extremely long)
18 // the memory pressure event will never go off.
19 const int kMemoryPressureIntervalMs = 60000;
20 } // namespace
22 class ResourceManagerDelegateImpl : public ResourceManagerDelegate {
23 public:
24 ResourceManagerDelegateImpl() {}
25 virtual ~ResourceManagerDelegateImpl() {}
27 private:
28 virtual int GetUsedMemoryInPercent() OVERRIDE {
29 return 0;
32 virtual int MemoryPressureIntervalInMS() OVERRIDE {
33 return kMemoryPressureIntervalMs;
35 DISALLOW_COPY_AND_ASSIGN(ResourceManagerDelegateImpl);
38 } // namespace test
40 // static
41 ResourceManagerDelegate*
42 ResourceManagerDelegate::CreateResourceManagerDelegate() {
43 return new test::ResourceManagerDelegateImpl;
46 } // namespace athena