OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "sandbox/win/src/crosscall_client.h" | 6 #include "sandbox/win/src/crosscall_client.h" |
7 #include "sandbox/win/src/crosscall_server.h" | 7 #include "sandbox/win/src/crosscall_server.h" |
8 #include "sandbox/win/src/sharedmem_ipc_client.h" | 8 #include "sandbox/win/src/sharedmem_ipc_client.h" |
9 #include "sandbox/win/src/sharedmem_ipc_server.h" | 9 #include "sandbox/win/src/sharedmem_ipc_server.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // This test-only IPC dispatcher has two handlers with the same signature | 558 // This test-only IPC dispatcher has two handlers with the same signature |
559 // but only CallOneHandler should be used. | 559 // but only CallOneHandler should be used. |
560 class UnitTestIPCDispatcher : public Dispatcher { | 560 class UnitTestIPCDispatcher : public Dispatcher { |
561 public: | 561 public: |
562 enum { | 562 enum { |
563 CALL_ONE_TAG = 78, | 563 CALL_ONE_TAG = 78, |
564 CALL_TWO_TAG = 87 | 564 CALL_TWO_TAG = 87 |
565 }; | 565 }; |
566 | 566 |
567 UnitTestIPCDispatcher(); | 567 UnitTestIPCDispatcher(); |
568 ~UnitTestIPCDispatcher() {}; | 568 ~UnitTestIPCDispatcher() override{}; |
569 | 569 |
570 virtual bool SetupService(InterceptionManager* manager, int service) { | 570 bool SetupService(InterceptionManager* manager, int service) override { |
571 return true; | 571 return true; |
572 } | 572 } |
573 | 573 |
574 private: | 574 private: |
575 bool CallOneHandler(IPCInfo* ipc, HANDLE p1, uint32 p2) { | 575 bool CallOneHandler(IPCInfo* ipc, HANDLE p1, uint32 p2) { |
576 ipc->return_info.extended[0].handle = p1; | 576 ipc->return_info.extended[0].handle = p1; |
577 ipc->return_info.extended[1].unsigned_int = p2; | 577 ipc->return_info.extended[1].unsigned_int = p2; |
578 return true; | 578 return true; |
579 } | 579 } |
580 | 580 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 &call_return)); | 630 &call_return)); |
631 EXPECT_EQ(SBOX_ALL_OK, call_return.call_outcome); | 631 EXPECT_EQ(SBOX_ALL_OK, call_return.call_outcome); |
632 EXPECT_TRUE(bar == call_return.extended[0].handle); | 632 EXPECT_TRUE(bar == call_return.extended[0].handle); |
633 EXPECT_EQ(foo, call_return.extended[1].unsigned_int); | 633 EXPECT_EQ(foo, call_return.extended[1].unsigned_int); |
634 | 634 |
635 CloseChannelEvents(client_control); | 635 CloseChannelEvents(client_control); |
636 delete[] reinterpret_cast<char*>(client_control); | 636 delete[] reinterpret_cast<char*>(client_control); |
637 } | 637 } |
638 | 638 |
639 } // namespace sandbox | 639 } // namespace sandbox |
OLD | NEW |