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

Unified Diff: third_party/WebKit/Source/platform/MemoryPurgeController.cpp

Issue 2080813004: Move platform/MemoryPurgeController -> core/dom/MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to dom/ Created 4 years, 6 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: third_party/WebKit/Source/platform/MemoryPurgeController.cpp
diff --git a/third_party/WebKit/Source/platform/MemoryPurgeController.cpp b/third_party/WebKit/Source/platform/MemoryPurgeController.cpp
deleted file mode 100644
index 54de8b90bb04f40e1497fbc2bb34f4eafdde2493..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/MemoryPurgeController.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 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 "platform/MemoryPurgeController.h"
-
-#include "base/sys_info.h"
-#include "platform/TraceEvent.h"
-#include "platform/graphics/ImageDecodingStore.h"
-#include "public/platform/Platform.h"
-#include "wtf/allocator/Partitions.h"
-
-namespace blink {
-
-void MemoryPurgeController::onMemoryPressure(WebMemoryPressureLevel level)
-{
- if (level == WebMemoryPressureLevelCritical) {
- // Clear the image cache.
- ImageDecodingStore::instance().clear();
- }
-}
-
-DEFINE_TRACE(MemoryPurgeClient)
-{
-}
-
-MemoryPurgeController::MemoryPurgeController()
- : m_deviceKind(base::SysInfo::IsLowEndDevice() ? DeviceKind::LowEnd : DeviceKind::NotSpecified)
-{
-}
-
-void MemoryPurgeController::purgeMemory()
-{
- // TODO(bashi): Add UMA
- TRACE_EVENT0("blink", "MemoryPurgeController::purgeMemory");
- for (auto& client : m_clients)
- client->purgeMemory(m_deviceKind);
- WTF::Partitions::decommitFreeableMemory();
-}
-
-DEFINE_TRACE(MemoryPurgeController)
-{
- visitor->trace(m_clients);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/MemoryPurgeController.h ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698