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

Unified Diff: base/memory/shared_memory_posix.cc

Issue 186473002: Deprecate named base::SharedMemory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/shared_memory_android.cc ('k') | base/memory/shared_memory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_posix.cc
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index 8ef911c23ff35d4523befd2257d5723a90a3aca2..8780c040cc2de72492b5b4e1c1c93456fad1d793 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -136,9 +136,9 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
ScopedFD readonly_fd(&readonly_fd_storage);
FilePath path;
- if (options.name == NULL || options.name->empty()) {
+ if (options.name_deprecated == NULL || options.name_deprecated->empty()) {
// It doesn't make sense to have a open-existing private piece of shmem
- DCHECK(!options.open_existing);
+ DCHECK(!options.open_existing_deprecated);
// Q: Why not use the shm_open() etc. APIs?
// A: Because they're limited to 4mb on OS X. FFFFFFFUUUUUUUUUUU
fp.reset(base::CreateAndOpenTemporaryShmemFile(&path, options.executable));
@@ -157,7 +157,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
PLOG(WARNING) << "unlink";
}
} else {
- if (!FilePathForMemoryName(*options.name, &path))
+ if (!FilePathForMemoryName(*options.name_deprecated, &path))
return false;
// Make sure that the file is opened without any permission
@@ -167,7 +167,7 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// First, try to create the file.
int fd = HANDLE_EINTR(
open(path.value().c_str(), O_RDWR | O_CREAT | O_EXCL, kOwnerOnly));
- if (fd == -1 && options.open_existing) {
+ if (fd == -1 && options.open_existing_deprecated) {
// If this doesn't work, try and open an existing file in append mode.
// Opening an existing file in a world writable directory has two main
// security implications:
« no previous file with comments | « base/memory/shared_memory_android.cc ('k') | base/memory/shared_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698