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

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

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/memory/discardable_memory_android.cc ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/memory/discardable_memory.h"
6
7 #include "base/logging.h"
8 #include "base/memory/discardable_memory_shmem.h"
9
10 namespace base {
11
12 // static
13 void DiscardableMemory::GetSupportedTypes(
14 std::vector<DiscardableMemoryType>* types) {
15 const DiscardableMemoryType supported_types[] = {
16 DISCARDABLE_MEMORY_TYPE_SHMEM
17 };
18 types->assign(supported_types, supported_types + arraysize(supported_types));
19 }
20
21 // static
22 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemoryWithType(
23 DiscardableMemoryType type, size_t size) {
24 switch (type) {
25 case DISCARDABLE_MEMORY_TYPE_SHMEM:
26 return make_scoped_ptr(new internal::DiscardableMemoryShmem(size));
27 case DISCARDABLE_MEMORY_TYPE_NONE:
28 NOTREACHED();
29 return nullptr;
30 }
31
32 NOTREACHED();
33 return nullptr;
34 }
35
36 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_android.cc ('k') | base/memory/discardable_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698