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

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

Issue 1407933008: Revert "mac: Run A/B experiment on SharedMemory mechanism for resource buffers." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_mac.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_HANDLE_H_ 5 #ifndef BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
6 #define BASE_MEMORY_SHARED_MEMORY_HANDLE_H_ 6 #define BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 private: 68 private:
69 HANDLE handle_; 69 HANDLE handle_;
70 70
71 // The process in which |handle_| is valid and can be used. If |handle_| is 71 // The process in which |handle_| is valid and can be used. If |handle_| is
72 // invalid, this will be kNullProcessId. 72 // invalid, this will be kNullProcessId.
73 base::ProcessId pid_; 73 base::ProcessId pid_;
74 }; 74 };
75 #else 75 #else
76 class BASE_EXPORT SharedMemoryHandle { 76 class BASE_EXPORT SharedMemoryHandle {
77 public: 77 public:
78 // The values of these enums must not change, as they are used by the
79 // histogram OSX.SharedMemory.Mechanism.
80 enum Type { 78 enum Type {
81 // The SharedMemoryHandle is backed by a POSIX fd. 79 // The SharedMemoryHandle is backed by a POSIX fd.
82 POSIX, 80 POSIX,
83 // The SharedMemoryHandle is backed by the Mach primitive "memory object". 81 // The SharedMemoryHandle is backed by the Mach primitive "memory object".
84 MACH, 82 MACH,
85 }; 83 };
86 static const int TypeMax = 2;
87 84
88 // The format that should be used to transmit |Type| over the wire. 85 // The format that should be used to transmit |Type| over the wire.
89 typedef int TypeWireFormat; 86 typedef int TypeWireFormat;
90 87
91 // The default constructor returns an invalid SharedMemoryHandle. 88 // The default constructor returns an invalid SharedMemoryHandle.
92 SharedMemoryHandle(); 89 SharedMemoryHandle();
93 90
94 // Constructs a SharedMemoryHandle backed by the components of a 91 // Constructs a SharedMemoryHandle backed by the components of a
95 // FileDescriptor. The newly created instance has the same ownership semantics 92 // FileDescriptor. The newly created instance has the same ownership semantics
96 // as base::FileDescriptor. This typically means that the SharedMemoryHandle 93 // as base::FileDescriptor. This typically means that the SharedMemoryHandle
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Defaults to |false|. 187 // Defaults to |false|.
191 bool ownership_passes_to_ipc_; 188 bool ownership_passes_to_ipc_;
192 }; 189 };
193 }; 190 };
194 }; 191 };
195 #endif 192 #endif
196 193
197 } // namespace base 194 } // namespace base
198 195
199 #endif // BASE_MEMORY_SHARED_MEMORY_HANDLE_H_ 196 #endif // BASE_MEMORY_SHARED_MEMORY_HANDLE_H_
OLDNEW
« no previous file with comments | « base/memory/shared_memory.h ('k') | base/memory/shared_memory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698