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

Unified Diff: content/browser/renderer_host/clipboard_message_filter_unittest.cc

Issue 2845113005: Replace base::SharedMemory read-only methods with GetReadOnlyHandle. (Closed)
Patch Set: Comments from thakis. 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/metrics/field_trial.cc ('k') | extensions/browser/user_script_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/clipboard_message_filter_unittest.cc
diff --git a/content/browser/renderer_host/clipboard_message_filter_unittest.cc b/content/browser/renderer_host/clipboard_message_filter_unittest.cc
index 3e01d863c92a6743c6ef266c41421102c9c180e6..f9e06fbdd3693bf4ece6942499168cbc629667ca 100644
--- a/content/browser/renderer_host/clipboard_message_filter_unittest.cc
+++ b/content/browser/renderer_host/clipboard_message_filter_unittest.cc
@@ -52,9 +52,10 @@ class ClipboardMessageFilterTest : public ::testing::Test {
void CallWriteImage(const gfx::Size& size,
base::SharedMemory* shared_memory) {
- base::SharedMemoryHandle handle;
- ASSERT_TRUE(shared_memory->GiveReadOnlyToProcess(
- base::GetCurrentProcessHandle(), &handle));
+ base::SharedMemoryHandle handle = shared_memory->GetReadOnlyHandle();
+ shared_memory->Unmap();
+ shared_memory->Close();
+ ASSERT_TRUE(handle.IsValid());
CallWriteImageDirectly(size, handle);
}
« no previous file with comments | « base/metrics/field_trial.cc ('k') | extensions/browser/user_script_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698