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

Unified Diff: sandbox/win/tests/common/controller.cc

Issue 2859843002: Add a GUID to base::SharedMemoryHandle. (Closed)
Patch Set: fix guid on android. Created 3 years, 7 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 | « sandbox/win/src/process_mitigations_win32k_dispatcher.cc ('k') | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/tests/common/controller.cc
diff --git a/sandbox/win/tests/common/controller.cc b/sandbox/win/tests/common/controller.cc
index 24070e78c1bd7f256998c553cb74f1e9b2713771..6a498144f7cfcb719e71ee45f895c3cdabfa1c45 100644
--- a/sandbox/win/tests/common/controller.cc
+++ b/sandbox/win/tests/common/controller.cc
@@ -11,6 +11,7 @@
#include "base/process/process_handle.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/sys_string_conversions.h"
+#include "base/unguessable_token.h"
#include "base/win/windows_version.h"
#include "sandbox/win/src/sandbox_factory.h"
@@ -315,7 +316,8 @@ int DispatchCall(int argc, wchar_t **argv) {
base::StringToUint(argv[4], reinterpret_cast<unsigned int*>(&raw_handle));
if (raw_handle == nullptr)
return SBOX_TEST_INVALID_PARAMETER;
- base::SharedMemoryHandle shared_handle(raw_handle);
+ base::SharedMemoryHandle shared_handle(raw_handle,
+ base::UnguessableToken::Create());
base::SharedMemory read_only_view(shared_handle, true);
if (!read_only_view.Map(0))
return SBOX_TEST_INVALID_PARAMETER;
« no previous file with comments | « sandbox/win/src/process_mitigations_win32k_dispatcher.cc ('k') | tools/gn/bootstrap/bootstrap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698