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

Unified Diff: base/memory/shared_memory_win.cc

Issue 937353002: Adding method to create process using LowBox token in sandbox code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added platform checking Created 5 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 | « no previous file | base/win/object_watcher.cc » ('j') | base/win/object_watcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_win.cc
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index 20659ab97af7b1d3220c077d69435146db226f3e..54c68ab6fe372b251a6b486518ad61824687eee7 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -143,8 +143,13 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
rand_values[0], rand_values[1],
rand_values[2], rand_values[3]);
}
+
+ LPCWSTR shared_memory_name = NULL;
rvargas (doing something else) 2015/02/21 01:01:22 nit: wchar_t* or char16*
Shrikant Kelkar 2015/02/21 02:32:40 removed, as per second comment.
+ if (!name_.empty())
+ shared_memory_name = name_.c_str();
+
mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, &sa,
- PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size), name_.c_str());
+ PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size), shared_memory_name);
rvargas (doing something else) 2015/02/21 01:01:22 name_.empty() ? nullptr : name_.c_str() ? Separate
Shrikant Kelkar 2015/02/21 02:32:40 Done.
if (!mapped_file_)
return false;
« no previous file with comments | « no previous file | base/win/object_watcher.cc » ('j') | base/win/object_watcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698