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

Unified Diff: base/memory/shared_memory_unittest.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 3 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 | « base/memory/shared_memory_handle_win.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index 0c09a5c44d5454f259d149bb4063f2ce502f1f83..291a55e358eb5025ddb187c08c893fedafdc832b 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -369,28 +369,20 @@ TEST(SharedMemoryTest, ShareReadOnly) {
EXPECT_EQ(0, munmap(writable, readonly_shmem.mapped_size()));
#elif defined(OS_WIN)
- EXPECT_EQ(NULL, MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, 0))
+ EXPECT_EQ(NULL, MapViewOfFile(handle.GetHandle(), FILE_MAP_WRITE, 0, 0, 0))
<< "Shouldn't be able to map memory writable.";
HANDLE temp_handle;
- BOOL rv = ::DuplicateHandle(GetCurrentProcess(),
- handle,
- GetCurrentProcess(),
- &temp_handle,
- FILE_MAP_ALL_ACCESS,
- false,
- 0);
+ BOOL rv = ::DuplicateHandle(GetCurrentProcess(), handle.GetHandle(),
+ GetCurrentProcess(), &temp_handle,
+ FILE_MAP_ALL_ACCESS, false, 0);
EXPECT_EQ(FALSE, rv)
<< "Shouldn't be able to duplicate the handle into a writable one.";
if (rv)
win::ScopedHandle writable_handle(temp_handle);
- rv = ::DuplicateHandle(GetCurrentProcess(),
- handle,
- GetCurrentProcess(),
- &temp_handle,
- FILE_MAP_READ,
- false,
- 0);
+ rv = ::DuplicateHandle(GetCurrentProcess(), handle.GetHandle(),
+ GetCurrentProcess(), &temp_handle, FILE_MAP_READ,
+ false, 0);
EXPECT_EQ(TRUE, rv)
<< "Should be able to duplicate the handle into a readable one.";
if (rv)
« no previous file with comments | « base/memory/shared_memory_handle_win.cc ('k') | base/memory/shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698