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
3 // found in the LICENSE file.
6 #include "platform/MemoryPurgeController.h"
8 #include "public/platform/Platform.h"
12 MemoryPurgeController::MemoryPurgeController()
13 : m_deviceKind(Platform::current()->isLowEndDeviceMode() ? DeviceKind::LowEnd
: DeviceKind::NotSpecified
)
17 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MemoryPurgeController
);
19 void MemoryPurgeController::purgeMemory(MemoryPurgeMode purgeMode
)
21 for (auto& client
: m_clients
)
22 client
->purgeMemory(purgeMode
, m_deviceKind
);
25 DEFINE_TRACE(MemoryPurgeController
)
28 visitor
->trace(m_clients
);