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

Side by Side Diff: trunk/src/base/memory/discardable_memory_linux.cc

Issue 135113003: Revert 244229 "base: Fix registering of memory pressure listener..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/memory/discardable_memory.h" 5 #include "base/memory/discardable_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/discardable_memory_emulated.h" 8 #include "base/memory/discardable_memory_emulated.h"
9 9
10 namespace base { 10 namespace base {
11 11
12 // static 12 // static
13 void DiscardableMemory::RegisterMemoryPressureListeners() {
14 internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
15 }
16
17 // static
18 void DiscardableMemory::UnregisterMemoryPressureListeners() {
19 internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
20 }
21
22 // static
23 void DiscardableMemory::GetSupportedTypes( 13 void DiscardableMemory::GetSupportedTypes(
24 std::vector<DiscardableMemoryType>* types) { 14 std::vector<DiscardableMemoryType>* types) {
25 const DiscardableMemoryType supported_types[] = { 15 const DiscardableMemoryType supported_types[] = {
26 DISCARDABLE_MEMORY_TYPE_EMULATED 16 DISCARDABLE_MEMORY_TYPE_EMULATED
27 }; 17 };
28 types->assign(supported_types, supported_types + arraysize(supported_types)); 18 types->assign(supported_types, supported_types + arraysize(supported_types));
29 } 19 }
30 20
31 // static 21 // static
32 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType( 22 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
(...skipping 21 matching lines...) Expand all
54 bool DiscardableMemory::PurgeForTestingSupported() { 44 bool DiscardableMemory::PurgeForTestingSupported() {
55 return true; 45 return true;
56 } 46 }
57 47
58 // static 48 // static
59 void DiscardableMemory::PurgeForTesting() { 49 void DiscardableMemory::PurgeForTesting() {
60 internal::DiscardableMemoryEmulated::PurgeForTesting(); 50 internal::DiscardableMemoryEmulated::PurgeForTesting();
61 } 51 }
62 52
63 } // namespace base 53 } // namespace base
OLDNEW
« no previous file with comments | « trunk/src/base/memory/discardable_memory_emulated.cc ('k') | trunk/src/base/memory/discardable_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698