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

Unified Diff: base/memory/shared_memory.h

Issue 1122163002: Ensure that the DirectWrite font cache works in Chrome canary on Windows 8+ with AppContainer prote… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index d76e01c6e57612024fe35dc7c430229d89cd5112..8b3fcf0b403c6f69afe4ddc21536a2dc20052c75 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -200,6 +200,14 @@ class BASE_EXPORT SharedMemory {
SharedMemoryId id() const { return inode_; }
#endif
+#if defined(OS_WIN)
+ // Allows the caller to specify if the underlying handle to the shared memory
+ // section is inheritable.
+ void set_inheritable(bool inheritable) {
+ inheritable_ = inheritable;
+ }
+#endif
+
// Closes the open shared memory segment. The memory will remain mapped if
// it was previously mapped.
// It is safe to call Close repeatedly.
@@ -286,6 +294,8 @@ class BASE_EXPORT SharedMemory {
#if defined(OS_WIN)
std::wstring name_;
HANDLE mapped_file_;
+ // Indicates if the shared memory handle is inhertiable. Defaults to false.
+ bool inheritable_;
#elif defined(OS_POSIX)
int mapped_file_;
int readonly_mapped_file_;
« no previous file with comments | « no previous file | base/memory/shared_memory_win.cc » ('j') | content/browser/renderer_host/render_process_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698