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

Unified Diff: components/memory_coordinator/browser/test_memory_monitor.h

Issue 2321313002: Move components/memory_coordinator -> content/ (Closed)
Patch Set: rebase etc Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/memory_coordinator/browser/test_memory_monitor.h
diff --git a/components/memory_coordinator/browser/test_memory_monitor.h b/components/memory_coordinator/browser/test_memory_monitor.h
deleted file mode 100644
index a9e1f8148ea3578b2f57035f7ddb855b0a8fc82e..0000000000000000000000000000000000000000
--- a/components/memory_coordinator/browser/test_memory_monitor.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 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 "components/memory_coordinator/browser/memory_monitor.h"
-
-#include "base/process/process_metrics.h"
-
-namespace memory_coordinator {
-
-// A delegate that allows mocking the various inputs to MemoryMonitor.
-class TestMemoryMonitorDelegate : public MemoryMonitorDelegate {
- public:
- TestMemoryMonitorDelegate() : calls_(0) { mem_info_ = {}; }
- ~TestMemoryMonitorDelegate() override;
-
- void GetSystemMemoryInfo(base::SystemMemoryInfoKB* mem_info) override;
-
- size_t calls() const { return calls_; }
- void ResetCalls() { calls_ = 0; }
-
- void SetTotalMemoryKB(int total_memory_kb) {
- mem_info_.total = total_memory_kb;
- }
-
- protected:
- // Because the fields of SystemMemoryInfoKB vary depending on the operating
- // system, specific derived classes will have to provide methods to load
- // values into |mem_info_|;
- base::SystemMemoryInfoKB mem_info_;
-
- private:
- size_t calls_;
-
- DISALLOW_COPY_AND_ASSIGN(TestMemoryMonitorDelegate);
-};
-
-} // namespace memory_coordinator

Powered by Google App Engine
This is Rietveld 408576698