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

Side by Side Diff: ipc/attachment_broker_privileged_win_unittest.cc

Issue 1354973006: ipc: Remove unnecessary attachment broker plumbing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors. Created 5 years, 3 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 | « content/test/render_thread_impl_browser_test_ipc_helper.cc ('k') | ipc/ipc_channel.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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 int CommonPrivilegedProcessMain(OnMessageReceivedCallback callback, 340 int CommonPrivilegedProcessMain(OnMessageReceivedCallback callback,
341 const char* channel_name) { 341 const char* channel_name) {
342 base::MessageLoopForIO main_message_loop; 342 base::MessageLoopForIO main_message_loop;
343 ProxyListener listener; 343 ProxyListener listener;
344 344
345 // Set up IPC channel. 345 // Set up IPC channel.
346 IPC::AttachmentBrokerPrivilegedWin broker; 346 IPC::AttachmentBrokerPrivilegedWin broker;
347 IPC::AttachmentBroker::SetGlobal(&broker); 347 IPC::AttachmentBroker::SetGlobal(&broker);
348 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( 348 scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
349 IPCTestBase::GetChannelName(channel_name), &listener, &broker)); 349 IPCTestBase::GetChannelName(channel_name), &listener));
350 broker.RegisterCommunicationChannel(channel.get()); 350 broker.RegisterCommunicationChannel(channel.get());
351 CHECK(channel->Connect()); 351 CHECK(channel->Connect());
352 352
353 MockObserver observer; 353 MockObserver observer;
354 broker.AddObserver(&observer); 354 broker.AddObserver(&observer);
355 355
356 while (true) { 356 while (true) {
357 base::MessageLoop::current()->Run(); 357 base::MessageLoop::current()->Run();
358 ProxyListener::Reason reason = listener.get_reason(); 358 ProxyListener::Reason reason = listener.get_reason();
359 if (reason == ProxyListener::CHANNEL_ERROR) 359 if (reason == ProxyListener::CHANNEL_ERROR)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleToSelf) { 424 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleToSelf) {
425 return CommonPrivilegedProcessMain(&SendHandleToSelfCallback, 425 return CommonPrivilegedProcessMain(&SendHandleToSelfCallback,
426 "SendHandleToSelf"); 426 "SendHandleToSelf");
427 } 427 }
428 428
429 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleWin) { 429 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleWin) {
430 return CommonPrivilegedProcessMain(&SendHandleCallback, "SendHandleWin"); 430 return CommonPrivilegedProcessMain(&SendHandleCallback, "SendHandleWin");
431 } 431 }
432 432
433 } // namespace 433 } // namespace
OLDNEW
« no previous file with comments | « content/test/render_thread_impl_browser_test_ipc_helper.cc ('k') | ipc/ipc_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698