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

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

Issue 2929013002: Revert of Add crash keys about field trial shared memory errors. (Closed)
Patch Set: Rebase & fix conflicts. Created 3 years, 6 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/shared_memory.h ('k') | base/memory/shared_memory_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef BASE_MEMORY_SHARED_MEMORY_HELPER_H_ 5 #ifndef BASE_MEMORY_SHARED_MEMORY_HELPER_H_
6 #define BASE_MEMORY_SHARED_MEMORY_HELPER_H_ 6 #define BASE_MEMORY_SHARED_MEMORY_HELPER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
11 11
12 namespace base { 12 namespace base {
13 13
14 #if !defined(OS_ANDROID) 14 #if !defined(OS_ANDROID)
15 // Makes a temporary file, fdopens it, and then unlinks it. |fp| is populated 15 // Makes a temporary file, fdopens it, and then unlinks it. |fp| is populated
16 // with the fdopened FILE. |readonly_fd| is populated with the opened fd if 16 // with the fdopened FILE. |readonly_fd| is populated with the opened fd if
17 // options.share_read_only is true. |path| is populated with the location of 17 // options.share_read_only is true. |path| is populated with the location of
18 // the file before it was unlinked. 18 // the file before it was unlinked.
19 // Returns false if there's a failure and sets |error|. 19 // Returns false if there's an unhandled failure.
20 bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options, 20 bool CreateAnonymousSharedMemory(const SharedMemoryCreateOptions& options,
21 ScopedFILE* fp, 21 ScopedFILE* fp,
22 ScopedFD* readonly_fd, 22 ScopedFD* readonly_fd,
23 FilePath* path, 23 FilePath* path);
24 SharedMemoryError* error);
25 24
26 // Takes the outputs of CreateAnonymousSharedMemory and maps them properly to 25 // Takes the outputs of CreateAnonymousSharedMemory and maps them properly to
27 // |mapped_file| or |readonly_mapped_file|, depending on which one is populated. 26 // |mapped_file| or |readonly_mapped_file|, depending on which one is populated.
28 // Returns false if there's a failure and sets |error|.
29 bool PrepareMapFile(ScopedFILE fp, 27 bool PrepareMapFile(ScopedFILE fp,
30 ScopedFD readonly_fd, 28 ScopedFD readonly_fd,
31 int* mapped_file, 29 int* mapped_file,
32 int* readonly_mapped_file, 30 int* readonly_mapped_file);
33 SharedMemoryError* error);
34 #endif 31 #endif
35 32
36 } // namespace base 33 } // namespace base
37 34
38 #endif // BASE_MEMORY_SHARED_MEMORY_HELPER_H_ 35 #endif // BASE_MEMORY_SHARED_MEMORY_HELPER_H_
OLDNEW
« no previous file with comments | « base/memory/shared_memory.h ('k') | base/memory/shared_memory_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698