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

Side by Side Diff: base/memory/discardable_memory_android.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 | « base/mac/sdk_forward_declarations.h ('k') | base/memory/discardable_memory_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // static 46 // static
47 bool DiscardableMemory::ReduceMemoryUsage() { 47 bool DiscardableMemory::ReduceMemoryUsage() {
48 return internal::DiscardableMemoryEmulated::ReduceMemoryUsage(); 48 return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
49 } 49 }
50 50
51 // static 51 // static
52 void DiscardableMemory::GetSupportedTypes( 52 void DiscardableMemory::GetSupportedTypes(
53 std::vector<DiscardableMemoryType>* types) { 53 std::vector<DiscardableMemoryType>* types) {
54 const DiscardableMemoryType supported_types[] = { 54 const DiscardableMemoryType supported_types[] = {
55 DISCARDABLE_MEMORY_TYPE_SHMEM,
55 DISCARDABLE_MEMORY_TYPE_ASHMEM, 56 DISCARDABLE_MEMORY_TYPE_ASHMEM,
56 DISCARDABLE_MEMORY_TYPE_SHMEM,
57 DISCARDABLE_MEMORY_TYPE_EMULATED 57 DISCARDABLE_MEMORY_TYPE_EMULATED
58 }; 58 };
59 types->assign(supported_types, supported_types + arraysize(supported_types)); 59 types->assign(supported_types, supported_types + arraysize(supported_types));
60 } 60 }
61 61
62 // static 62 // static
63 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType( 63 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
64 DiscardableMemoryType type, size_t size) { 64 DiscardableMemoryType type, size_t size) {
65 switch (type) { 65 switch (type) {
66 case DISCARDABLE_MEMORY_TYPE_ASHMEM: { 66 case DISCARDABLE_MEMORY_TYPE_ASHMEM: {
(...skipping 26 matching lines...) Expand all
93 case DISCARDABLE_MEMORY_TYPE_MACH: 93 case DISCARDABLE_MEMORY_TYPE_MACH:
94 NOTREACHED(); 94 NOTREACHED();
95 return nullptr; 95 return nullptr;
96 } 96 }
97 97
98 NOTREACHED(); 98 NOTREACHED();
99 return nullptr; 99 return nullptr;
100 } 100 }
101 101
102 } // namespace base 102 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/sdk_forward_declarations.h ('k') | base/memory/discardable_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698