summaryrefslogtreecommitdiffstats
path: root/content/child/resource_dispatcher_unittest.cc
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2014-10-17 15:32:16 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-17 22:32:40 +0000
commit079d184e2786686546385df92c7e72d8023f2941 (patch)
tree9ecf11940254e298ad70b8e9a1b18adb7709285b /content/child/resource_dispatcher_unittest.cc
parent09593fede3cf4ce740d55551cbbf8bd726a6fbd2 (diff)
downloadchromium_src-079d184e2786686546385df92c7e72d8023f2941.zip
chromium_src-079d184e2786686546385df92c7e72d8023f2941.tar.gz
chromium_src-079d184e2786686546385df92c7e72d8023f2941.tar.bz2
Enforce handle ownership in base::Process.
The main user (and the immediate reason for the change) is to improve handle ownership in content::ChildProcessLauncher. This CL is not enforcing clean ownership beyond ChildProcessLauncher; that is to be covered by subsequent CLs. BUG=417532 TEST=base_unittests R=scottmg@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/651253002 Cr-Commit-Position: refs/heads/master@{#300180}
Diffstat (limited to 'content/child/resource_dispatcher_unittest.cc')
-rw-r--r--content/child/resource_dispatcher_unittest.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 50b8acd..947862e 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -9,7 +9,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
-#include "base/process/process.h"
#include "base/process/process_handle.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
@@ -276,8 +275,8 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender {
EXPECT_TRUE(shared_memory->CreateAndMapAnonymous(buffer_size));
base::SharedMemoryHandle duplicate_handle;
- EXPECT_TRUE(shared_memory->ShareToProcess(
- base::Process::Current().handle(), &duplicate_handle));
+ EXPECT_TRUE(shared_memory->ShareToProcess(base::GetCurrentProcessHandle(),
+ &duplicate_handle));
EXPECT_TRUE(dispatcher_.OnMessageReceived(
ResourceMsg_SetDataBuffer(request_id, duplicate_handle,
shared_memory->requested_size(), 0)));