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

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

Issue 2692273008: Hacky slashy (Closed)
Patch Set: wip Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_helper.h" 5 #include "base/memory/shared_memory_helper.h"
6 6
7 #include <unistd.h>
8
7 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
8 10
9 namespace base { 11 namespace base {
10 12
11 struct ScopedPathUnlinkerTraits { 13 struct ScopedPathUnlinkerTraits {
12 static const FilePath* InvalidValue() { return nullptr; } 14 static const FilePath* InvalidValue() { return nullptr; }
13 15
14 static void Free(const FilePath* path) { 16 static void Free(const FilePath* path) {
15 if (unlink(path->value().c_str())) 17 if (unlink(path->value().c_str()))
16 PLOG(WARNING) << "unlink"; 18 PLOG(WARNING) << "unlink";
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (*mapped_file == -1) { 91 if (*mapped_file == -1) {
90 NOTREACHED() << "Call to dup failed, errno=" << errno; 92 NOTREACHED() << "Call to dup failed, errno=" << errno;
91 } 93 }
92 *readonly_mapped_file = readonly_fd.release(); 94 *readonly_mapped_file = readonly_fd.release();
93 95
94 return true; 96 return true;
95 } 97 }
96 #endif // !defined(OS_ANDROID) 98 #endif // !defined(OS_ANDROID)
97 99
98 } // namespace base 100 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698