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

Side by Side Diff: ipc/attachment_broker_privileged_win_unittest.cc

Issue 1704743002: Revert of Clean up public interface of AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « ipc/attachment_broker_privileged.cc ('k') | ipc/attachment_broker_unprivileged.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 // Takes ownership of |broker|. Has no effect if called after CommonSetUp(). 260 // Takes ownership of |broker|. Has no effect if called after CommonSetUp().
261 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) { 261 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) {
262 broker_.reset(broker); 262 broker_.reset(broker);
263 } 263 }
264 264
265 void CommonSetUp() { 265 void CommonSetUp() {
266 if (!broker_.get()) 266 if (!broker_.get())
267 set_broker(new IPC::AttachmentBrokerUnprivilegedWin); 267 set_broker(new IPC::AttachmentBrokerUnprivilegedWin);
268 broker_->AddObserver(&observer_, task_runner()); 268 broker_->AddObserver(&observer_, task_runner());
269 CreateChannel(&proxy_listener_); 269 CreateChannel(&proxy_listener_);
270 broker_->RegisterBrokerCommunicationChannel(channel()); 270 broker_->DesignateBrokerCommunicationChannel(channel());
271 ASSERT_TRUE(ConnectChannel()); 271 ASSERT_TRUE(ConnectChannel());
272 ASSERT_TRUE(StartClient()); 272 ASSERT_TRUE(StartClient());
273 273
274 handle_count_ = GetCurrentProcessHandleCount(); 274 handle_count_ = GetCurrentProcessHandleCount();
275 EXPECT_NE(handle_count_, 0u); 275 EXPECT_NE(handle_count_, 0u);
276 } 276 }
277 277
278 void CommonTearDown() { 278 void CommonTearDown() {
279 EXPECT_EQ(handle_count_, handle_count_); 279 EXPECT_EQ(handle_count_, handle_count_);
280 280
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 memcmp(shared_memory->memory(), kDataBuffer, strlen(kDataBuffer)) == 0; 643 memcmp(shared_memory->memory(), kDataBuffer, strlen(kDataBuffer)) == 0;
644 SendControlMessage(sender, success); 644 SendControlMessage(sender, success);
645 } 645 }
646 646
647 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendSharedMemoryHandle) { 647 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendSharedMemoryHandle) {
648 return CommonPrivilegedProcessMain(&SendSharedMemoryHandleCallback, 648 return CommonPrivilegedProcessMain(&SendSharedMemoryHandleCallback,
649 "SendSharedMemoryHandle"); 649 "SendSharedMemoryHandle");
650 } 650 }
651 651
652 } // namespace 652 } // namespace
OLDNEW
« no previous file with comments | « ipc/attachment_broker_privileged.cc ('k') | ipc/attachment_broker_unprivileged.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698