OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/shared_memory.h" | 5 #include "base/memory/shared_memory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <sys/mman.h> | 8 #include <sys/mman.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 if (-1 == readonly_mapped_file_) { | 45 if (-1 == readonly_mapped_file_) { |
46 DPLOG(ERROR) << "dup() failed"; | 46 DPLOG(ERROR) << "dup() failed"; |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 requested_size_ = options.size; | 50 requested_size_ = options.size; |
51 | 51 |
52 return true; | 52 return true; |
53 } | 53 } |
54 | 54 |
55 bool SharedMemory::Delete(const std::string& name) { | 55 bool SharedMemory::Delete(const std::string& /* name */) { |
danakj
2016/05/23 02:59:54
delete
Luis Héctor Chávez
2016/05/24 15:27:53
Done.
| |
56 // Like on Windows, this is intentionally returning true as ashmem will | 56 // Like on Windows, this is intentionally returning true as ashmem will |
57 // automatically releases the resource when all FDs on it are closed. | 57 // automatically releases the resource when all FDs on it are closed. |
58 return true; | 58 return true; |
59 } | 59 } |
60 | 60 |
61 bool SharedMemory::Open(const std::string& name, bool read_only) { | 61 bool SharedMemory::Open(const std::string& /* name */, bool /* read_only */) { |
danakj
2016/05/23 02:59:54
the |name| isn't doing much, but bool isnt clear w
Luis Héctor Chávez
2016/05/24 15:27:53
The problem is that some of these changes are in h
| |
62 // ashmem doesn't support name mapping | 62 // ashmem doesn't support name mapping |
63 NOTIMPLEMENTED(); | 63 NOTIMPLEMENTED(); |
64 return false; | 64 return false; |
65 } | 65 } |
66 | 66 |
67 } // namespace base | 67 } // namespace base |
OLD | NEW |