OLD | NEW |
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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/discardable_memory_shmem.h" | 8 #include "base/memory/discardable_memory_shmem.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 13 matching lines...) Expand all Loading... |
24 switch (type) { | 24 switch (type) { |
25 case DISCARDABLE_MEMORY_TYPE_SHMEM: { | 25 case DISCARDABLE_MEMORY_TYPE_SHMEM: { |
26 scoped_ptr<internal::DiscardableMemoryShmem> memory( | 26 scoped_ptr<internal::DiscardableMemoryShmem> memory( |
27 new internal::DiscardableMemoryShmem(size)); | 27 new internal::DiscardableMemoryShmem(size)); |
28 if (!memory->Initialize()) | 28 if (!memory->Initialize()) |
29 return nullptr; | 29 return nullptr; |
30 | 30 |
31 return memory.Pass(); | 31 return memory.Pass(); |
32 } | 32 } |
33 case DISCARDABLE_MEMORY_TYPE_NONE: | 33 case DISCARDABLE_MEMORY_TYPE_NONE: |
34 case DISCARDABLE_MEMORY_TYPE_MACH: | |
35 NOTREACHED(); | 34 NOTREACHED(); |
36 return nullptr; | 35 return nullptr; |
37 } | 36 } |
38 | 37 |
39 NOTREACHED(); | 38 NOTREACHED(); |
40 return nullptr; | 39 return nullptr; |
41 } | 40 } |
42 | 41 |
43 } // namespace base | 42 } // namespace base |
OLD | NEW |