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

Side by Side Diff: ipc/ipc_send_fds_test.cc

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('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 (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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "ipc/ipc_tests.h" 7 #include "ipc/ipc_tests.h"
8 8
9 #if defined(OS_MACOSX) 9 #if defined(OS_MACOSX)
10 extern "C" { 10 extern "C" {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 ASSERT_EQ(close(fd), 0); 43 ASSERT_EQ(close(fd), 0);
44 44
45 // We compare iNode numbers to check that the file sent over the wire 45 // We compare iNode numbers to check that the file sent over the wire
46 // was actually the same physical file as the one we were expecting. 46 // was actually the same physical file as the one we were expecting.
47 ASSERT_EQ(inode_num, st.st_ino); 47 ASSERT_EQ(inode_num, st.st_ino);
48 } 48 }
49 49
50 class MyChannelDescriptorListener : public IPC::Listener { 50 class MyChannelDescriptorListener : public IPC::Listener {
51 public: 51 public:
52 MyChannelDescriptorListener(ino_t expected_inode_num) 52 explicit MyChannelDescriptorListener(ino_t expected_inode_num)
53 : expected_inode_num_(expected_inode_num), 53 : expected_inode_num_(expected_inode_num),
54 num_fds_received_(0) {} 54 num_fds_received_(0) {}
55 55
56 virtual bool OnMessageReceived(const IPC::Message& message) { 56 virtual bool OnMessageReceived(const IPC::Message& message) {
57 PickleIterator iter(message); 57 PickleIterator iter(message);
58 58
59 ++num_fds_received_; 59 ++num_fds_received_;
60 base::FileDescriptor descriptor; 60 base::FileDescriptor descriptor;
61 61
62 IPC::ParamTraits<base::FileDescriptor>::Read( 62 IPC::ParamTraits<base::FileDescriptor>::Read(
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_SERVER, 196 IPC::Channel chan(kTestClientChannel, IPC::Channel::MODE_SERVER,
197 &listener); 197 &listener);
198 ASSERT_TRUE(chan.Connect()); 198 ASSERT_TRUE(chan.Connect());
199 199
200 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT, 200 base::ProcessHandle process_handle = SpawnChild(TEST_DESCRIPTOR_CLIENT,
201 &chan); 201 &chan);
202 TestDescriptorServer(chan, process_handle); 202 TestDescriptorServer(chan, process_handle);
203 } 203 }
204 204
205 #endif // defined(OS_POSIX) 205 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « ipc/ipc_fuzzing_tests.cc ('k') | ipc/ipc_sync_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698