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

Side by Side Diff: base/shared_memory_android.cc

Issue 7701014: Upstream misc changes for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 (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/shared_memory.h" 5 #include "base/shared_memory.h"
6 6
7 #include <sys/mman.h> 7 #include <sys/mman.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "third_party/ashmem/ashmem.h" 10 #include "third_party/ashmem/ashmem.h"
(...skipping 21 matching lines...) Expand all
32 if (err < 0) { 32 if (err < 0) {
33 DLOG(ERROR) << "Error " << err << " when setting protection of ashmem"; 33 DLOG(ERROR) << "Error " << err << " when setting protection of ashmem";
34 return false; 34 return false;
35 } 35 }
36 created_size_ = size; 36 created_size_ = size;
37 37
38 return true; 38 return true;
39 } 39 }
40 40
41 bool SharedMemory::Delete(const std::string& name) { 41 bool SharedMemory::Delete(const std::string& name) {
42 // ashmem doesn't support name mapping 42 // Like on Windows, this is intentionally returning true as ashmem will
43 NOTIMPLEMENTED(); 43 // automatically releases the resource when all FDs on it are closed.
44 return false; 44 return true;
45 } 45 }
46 46
47 bool SharedMemory::Open(const std::string& name, bool read_only) { 47 bool SharedMemory::Open(const std::string& name, bool read_only) {
48 // ashmem doesn't support name mapping 48 // ashmem doesn't support name mapping
49 NOTIMPLEMENTED(); 49 NOTIMPLEMENTED();
50 return false; 50 return false;
51 } 51 }
52 52
53 } // namespace base 53 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698