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

Unified Diff: base/metrics/persistent_memory_allocator_unittest.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Compile error. Created 3 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
« no previous file with comments | « base/memory/shared_memory_win.cc ('k') | chrome/renderer/pepper/pepper_shared_memory_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_memory_allocator_unittest.cc
diff --git a/base/metrics/persistent_memory_allocator_unittest.cc b/base/metrics/persistent_memory_allocator_unittest.cc
index f67da0c7abfe6f9f46e2673205ac62693cdaca64..b3b4d9b9afc17479f27c3fda76f37a038e5ae7d5 100644
--- a/base/metrics/persistent_memory_allocator_unittest.cc
+++ b/base/metrics/persistent_memory_allocator_unittest.cc
@@ -620,10 +620,10 @@ TEST(SharedPersistentMemoryAllocatorTest, CreationTest) {
EXPECT_FALSE(local.IsFull());
EXPECT_FALSE(local.IsCorrupt());
- ASSERT_TRUE(local.shared_memory()->ShareToProcess(GetCurrentProcessHandle(),
- &shared_handle_1));
- ASSERT_TRUE(local.shared_memory()->ShareToProcess(GetCurrentProcessHandle(),
- &shared_handle_2));
+ shared_handle_1 = local.shared_memory()->handle().Duplicate();
+ ASSERT_TRUE(shared_handle_1.IsValid());
+ shared_handle_2 = local.shared_memory()->handle().Duplicate();
+ ASSERT_TRUE(shared_handle_2.IsValid());
}
// Read-only test.
« no previous file with comments | « base/memory/shared_memory_win.cc ('k') | chrome/renderer/pepper/pepper_shared_memory_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698