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

Unified Diff: components/display_compositor/host_shared_bitmap_manager_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
Index: components/display_compositor/host_shared_bitmap_manager_unittest.cc
diff --git a/components/display_compositor/host_shared_bitmap_manager_unittest.cc b/components/display_compositor/host_shared_bitmap_manager_unittest.cc
index dd6bbe9960b09681d0f48efdb8314ab6b590516a..a4284822d776f631901d464138062b082570f907 100644
--- a/components/display_compositor/host_shared_bitmap_manager_unittest.cc
+++ b/components/display_compositor/host_shared_bitmap_manager_unittest.cc
@@ -27,8 +27,7 @@ TEST_F(HostSharedBitmapManagerTest, TestCreate) {
cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
HostSharedBitmapManagerClient client(manager_.get());
- base::SharedMemoryHandle handle;
- bitmap->ShareToProcess(base::GetCurrentProcessHandle(), &handle);
+ base::SharedMemoryHandle handle = bitmap->handle().Duplicate();
client.ChildAllocatedSharedBitmap(size_in_bytes, handle, id);
std::unique_ptr<cc::SharedBitmap> large_bitmap;
@@ -85,10 +84,9 @@ TEST_F(HostSharedBitmapManagerTest, RemoveProcess) {
memset(bitmap->memory(), 0xff, size_in_bytes);
cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
- base::SharedMemoryHandle handle;
std::unique_ptr<HostSharedBitmapManagerClient> client(
new HostSharedBitmapManagerClient(manager_.get()));
- bitmap->ShareToProcess(base::GetCurrentProcessHandle(), &handle);
+ base::SharedMemoryHandle handle = bitmap->handle().Duplicate();
client->ChildAllocatedSharedBitmap(size_in_bytes, handle, id);
std::unique_ptr<cc::SharedBitmap> shared_bitmap;
@@ -118,8 +116,7 @@ TEST_F(HostSharedBitmapManagerTest, AddDuplicate) {
cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
HostSharedBitmapManagerClient client(manager_.get());
- base::SharedMemoryHandle handle;
- bitmap->ShareToProcess(base::GetCurrentProcessHandle(), &handle);
+ base::SharedMemoryHandle handle = bitmap->handle().Duplicate();
client.ChildAllocatedSharedBitmap(size_in_bytes, handle, id);
std::unique_ptr<base::SharedMemory> bitmap2(new base::SharedMemory());
« no previous file with comments | « chrome/renderer/pepper/pepper_shared_memory_message_filter.cc ('k') | components/nacl/browser/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698