summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 05:23:13 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-23 05:23:13 +0000
commitb7243c40f2c0e4742843d56d0a46c3d5ba2008d1 (patch)
treef3ba1cec0461cab175f637deab6a837cfbb4d105 /ipc
parent87a03a05c9dd5b2bf5fcf916526361f5c33b71de (diff)
downloadchromium_src-b7243c40f2c0e4742843d56d0a46c3d5ba2008d1.zip
chromium_src-b7243c40f2c0e4742843d56d0a46c3d5ba2008d1.tar.gz
chromium_src-b7243c40f2c0e4742843d56d0a46c3d5ba2008d1.tar.bz2
Random bits of header and whitespace cleanup.
BUG=none TEST=noe Review URL: http://codereview.chromium.org/3062003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_sync_channel_unittest.cc26
-rw-r--r--ipc/ipc_tests.cc11
2 files changed, 17 insertions, 20 deletions
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index a542a8c..83b1a7a 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -265,7 +265,7 @@ namespace {
class SimpleServer : public Worker {
public:
- SimpleServer(bool pump_during_send)
+ explicit SimpleServer(bool pump_during_send)
: Worker(Channel::MODE_SERVER, "simpler_server"),
pump_during_send_(pump_during_send) { }
void Run() {
@@ -426,7 +426,7 @@ class UnblockServer : public Worker {
class UnblockClient : public Worker {
public:
- UnblockClient(bool pump_during_send)
+ explicit UnblockClient(bool pump_during_send)
: Worker(Channel::MODE_CLIENT, "unblock_client"),
pump_during_send_(pump_during_send) { }
@@ -577,7 +577,7 @@ namespace {
class MultipleServer1 : public Worker {
public:
- MultipleServer1(bool pump_during_send)
+ explicit MultipleServer1(bool pump_during_send)
: Worker("test_channel1", Channel::MODE_SERVER),
pump_during_send_(pump_during_send) { }
@@ -694,9 +694,9 @@ namespace {
// nested calls are issued.
class QueuedReplyServer : public Worker {
public:
- QueuedReplyServer(base::Thread* listener_thread,
- const std::string& channel_name,
- const std::string& reply_text)
+ QueuedReplyServer(base::Thread* listener_thread,
+ const std::string& channel_name,
+ const std::string& reply_text)
: Worker(channel_name, Channel::MODE_SERVER),
reply_text_(reply_text) {
Worker::OverrideThread(listener_thread);
@@ -808,7 +808,7 @@ namespace {
class BadServer : public Worker {
public:
- BadServer(bool pump_during_send)
+ explicit BadServer(bool pump_during_send)
: Worker(Channel::MODE_SERVER, "simpler_server"),
pump_during_send_(pump_during_send) { }
void Run() {
@@ -899,9 +899,9 @@ namespace {
class TimeoutServer : public Worker {
public:
- TimeoutServer(int timeout_ms,
- std::vector<bool> timeout_seq,
- bool pump_during_send)
+ TimeoutServer(int timeout_ms,
+ std::vector<bool> timeout_seq,
+ bool pump_during_send)
: Worker(Channel::MODE_SERVER, "timeout_server"),
timeout_ms_(timeout_ms),
timeout_seq_(timeout_seq),
@@ -924,10 +924,10 @@ class TimeoutServer : public Worker {
class UnresponsiveClient : public Worker {
public:
- UnresponsiveClient(std::vector<bool> timeout_seq)
+ explicit UnresponsiveClient(std::vector<bool> timeout_seq)
: Worker(Channel::MODE_CLIENT, "unresponsive_client"),
timeout_seq_(timeout_seq) {
- }
+ }
void OnAnswerDelay(Message* reply_msg) {
DCHECK(!timeout_seq_.empty());
@@ -1010,7 +1010,7 @@ namespace {
class NestedTask : public Task {
public:
- NestedTask(Worker* server) : server_(server) { }
+ explicit NestedTask(Worker* server) : server_(server) { }
void Run() {
// Sleep a bit so that we wake up after the reply has been received.
PlatformThread::Sleep(250);
diff --git a/ipc/ipc_tests.cc b/ipc/ipc_tests.cc
index f17fc18..c11fb70 100644
--- a/ipc/ipc_tests.cc
+++ b/ipc/ipc_tests.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <string>
+#include <utility>
#include "ipc/ipc_tests.h"
@@ -20,10 +21,6 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/debug_on_start.h"
-#if defined(OS_POSIX)
-#include "base/at_exit.h"
-#include "base/global_descriptors_posix.h"
-#endif
#include "base/perftimer.h"
#include "base/test/perf_test_suite.h"
#include "base/test/test_suite.h"
@@ -96,7 +93,7 @@ base::ProcessHandle IPCChannelTest::SpawnChild(ChildType child_type,
base::file_handle_mapping_vector fds_to_map;
const int ipcfd = channel->GetClientFileDescriptor();
if (ipcfd > -1) {
- fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3));
+ fds_to_map.push_back(std::pair<int, int>(ipcfd, kPrimaryIPCChannel + 3));
}
base::ProcessHandle ret = NULL;
@@ -271,7 +268,7 @@ TEST_F(IPCChannelTest, ChannelProxyTest) {
base::file_handle_mapping_vector fds_to_map;
const int ipcfd = chan.GetClientFileDescriptor();
if (ipcfd > -1) {
- fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3));
+ fds_to_map.push_back(std::pair<int, int>(ipcfd, kPrimaryIPCChannel + 3));
}
base::ProcessHandle process_handle = MultiProcessTest::SpawnChild(