Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: components/memory_pressure/test_memory_pressure_calculator.h

Issue 1311743005: One more memory_pressure style fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_ 5 #ifndef COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_
6 #define COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_ 6 #define COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_
7 7
8 #include "components/memory_pressure/memory_pressure_calculator.h" 8 #include "components/memory_pressure/memory_pressure_calculator.h"
9 9
10 namespace memory_pressure { 10 namespace memory_pressure {
11 11
12 #if defined(MEMORY_PRESSURE_IS_POLLING) 12 #if defined(MEMORY_PRESSURE_IS_POLLING)
13 13
14 // A mock memory pressure calculator for unittesting. 14 // A mock memory pressure calculator for unittesting.
15 class TestMemoryPressureCalculator : public MemoryPressureCalculator { 15 class TestMemoryPressureCalculator : public MemoryPressureCalculator {
16 public: 16 public:
17 TestMemoryPressureCalculator(); 17 TestMemoryPressureCalculator();
18 virtual ~TestMemoryPressureCalculator() {} 18 ~TestMemoryPressureCalculator() override {}
19 19
20 // MemoryPressureCalculator implementation. 20 // MemoryPressureCalculator implementation.
21 MemoryPressureLevel CalculateCurrentPressureLevel() override; 21 MemoryPressureLevel CalculateCurrentPressureLevel() override;
22 22
23 // Sets the mock calculator to return no pressure. 23 // Sets the mock calculator to return no pressure.
24 void SetNone(); 24 void SetNone();
25 25
26 // Sets the mock calculator to return moderate pressure. 26 // Sets the mock calculator to return moderate pressure.
27 void SetModerate(); 27 void SetModerate();
28 28
(...skipping 11 matching lines...) Expand all
40 int calls_; 40 int calls_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(TestMemoryPressureCalculator); 42 DISALLOW_COPY_AND_ASSIGN(TestMemoryPressureCalculator);
43 }; 43 };
44 44
45 #endif // defined(MEMORY_PRESSURE_IS_POLLING) 45 #endif // defined(MEMORY_PRESSURE_IS_POLLING)
46 46
47 } // namespace memory_pressure 47 } // namespace memory_pressure
48 48
49 #endif // COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_ 49 #endif // COMPONENTS_MEMORY_PRESSURE_TEST_MEMORY_PRESSURE_CALCULATOR_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698