diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 05:23:13 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 05:23:13 +0000 |
commit | b7243c40f2c0e4742843d56d0a46c3d5ba2008d1 (patch) | |
tree | f3ba1cec0461cab175f637deab6a837cfbb4d105 | |
parent | 87a03a05c9dd5b2bf5fcf916526361f5c33b71de (diff) | |
download | chromium_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
-rw-r--r-- | base/message_loop_unittest.cc | 14 | ||||
-rw-r--r-- | chrome/browser/views/tab_contents/tab_contents_drag_win.cc | 4 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 10 | ||||
-rw-r--r-- | chrome/common/child_process.cc | 9 | ||||
-rw-r--r-- | ipc/ipc_sync_channel_unittest.cc | 26 | ||||
-rw-r--r-- | ipc/ipc_tests.cc | 11 | ||||
-rw-r--r-- | webkit/appcache/appcache_request_handler_unittest.cc | 4 | ||||
-rw-r--r-- | webkit/appcache/appcache_response_unittest.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job_unittest.cc | 3 |
9 files changed, 51 insertions, 36 deletions
diff --git a/base/message_loop_unittest.cc b/base/message_loop_unittest.cc index 719a01a..bbfa56d 100644 --- a/base/message_loop_unittest.cc +++ b/base/message_loop_unittest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <vector> + #include "base/eintr_wrapper.h" #include "base/logging.h" #include "base/message_loop.h" @@ -839,8 +841,8 @@ class Recursive2Tasks : public Task { for (;;) { HWND button = FindWindowEx(window, NULL, L"Button", NULL); if (button != NULL) { - EXPECT_TRUE(0 == SendMessage(button, WM_LBUTTONDOWN, 0, 0)); - EXPECT_TRUE(0 == SendMessage(button, WM_LBUTTONUP, 0, 0)); + EXPECT_EQ(0, SendMessage(button, WM_LBUTTONDOWN, 0, 0)); + EXPECT_EQ(0, SendMessage(button, WM_LBUTTONUP, 0, 0)); break; } } @@ -1459,7 +1461,7 @@ TEST(MessageLoopTest, NonNestableDelayedInNestedLoop) { class DummyTask : public Task { public: - DummyTask(int num_tasks) : num_tasks_(num_tasks) {} + explicit DummyTask(int num_tasks) : num_tasks_(num_tasks) {} virtual void Run() { if (num_tasks_ > 1) { @@ -1477,7 +1479,7 @@ class DummyTask : public Task { class DummyTaskObserver : public MessageLoop::TaskObserver { public: - DummyTaskObserver(int num_tasks) + explicit DummyTaskObserver(int num_tasks) : num_tasks_started_(0), num_tasks_processed_(0), num_tasks_(num_tasks) {} @@ -1593,7 +1595,7 @@ TEST(MessageLoopTest, FileDescriptorWatcherOutlivesMessageLoop) { // pipe() is just the easiest way to do it. int pipefds[2]; int err = pipe(pipefds); - ASSERT_TRUE(err == 0); + ASSERT_EQ(0, err); int fd = pipefds[1]; { // Arrange for controller to live longer than message loop. @@ -1618,7 +1620,7 @@ TEST(MessageLoopTest, FileDescriptorWatcherDoubleStop) { // (Errors only showed up in valgrind.) int pipefds[2]; int err = pipe(pipefds); - ASSERT_TRUE(err == 0); + ASSERT_EQ(0, err); int fd = pipefds[1]; { // Arrange for message loop to live longer than controller. diff --git a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc index d52134a..c2050e5 100644 --- a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc +++ b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 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. @@ -6,6 +6,8 @@ #include <windows.h> +#include <string> + #include "base/file_path.h" #include "base/message_loop.h" #include "base/task.h" diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index f697f29..ec79c96 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -540,11 +540,11 @@ }, }, }, - }], + }], ['OS=="mac"', { 'dependencies': [ 'nacl_security_tests', # run time dependency - ], + ], }], ], }, @@ -901,7 +901,7 @@ 'browser/configuration_policy_provider_win_unittest.cc', 'browser/cookies_tree_model_unittest.cc', 'browser/debugger/devtools_manager_unittest.cc', - 'browser/dock_info_unittest.cc', + 'browser/dock_info_unittest.cc', 'browser/dom_ui/dom_ui_theme_source_unittest.cc', 'browser/dom_ui/dom_ui_unittest.cc', 'browser/dom_ui/html_dialog_tab_contents_delegate_unittest.cc', @@ -1135,7 +1135,7 @@ 'common/bzip2_unittest.cc', 'common/child_process_logging_mac_unittest.mm', 'common/common_param_traits_unittest.cc', - 'common/content_settings_helper_unittest.cc', + 'common/content_settings_helper_unittest.cc', 'common/deprecated/event_sys_unittest.cc', 'common/desktop_notifications/active_notification_tracker_unittest.cc', 'common/extensions/extension_action_unittest.cc', @@ -1309,7 +1309,7 @@ 'sources!': [ # Blocked on bookmark manager. 'browser/bookmarks/bookmark_context_menu_controller_unittest.cc', - 'browser/dock_info_unittest.cc', + 'browser/dock_info_unittest.cc', 'browser/gtk/reload_button_gtk_unittest.cc', 'browser/password_manager/password_store_default_unittest.cc', 'tools/convert_dict/convert_dict_unittest.cc', diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc index 328ca14..71d025a 100644 --- a/chrome/common/child_process.cc +++ b/chrome/common/child_process.cc @@ -1,19 +1,22 @@ -// Copyright (c) 2006-2008 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. #include "chrome/common/child_process.h" +#if defined(OS_POSIX) +#include <signal.h> // For SigUSR1Handler below. +#endif + #include "app/l10n_util.h" #include "base/message_loop.h" #include "base/process_util.h" #include "base/string_util.h" +#include "base/thread.h" #include "chrome/common/child_thread.h" #include "grit/chromium_strings.h" #if defined(OS_POSIX) -#include <signal.h> - static void SigUSR1Handler(int signal) { } #endif 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( diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc index d2c7c9e..a857be6 100644 --- a/webkit/appcache/appcache_request_handler_unittest.cc +++ b/webkit/appcache/appcache_request_handler_unittest.cc @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stack> +#include <string> +#include <vector> + #include "base/message_loop.h" #include "base/thread.h" #include "base/waitable_event.h" diff --git a/webkit/appcache/appcache_response_unittest.cc b/webkit/appcache/appcache_response_unittest.cc index 52514ae..b91e496 100644 --- a/webkit/appcache/appcache_response_unittest.cc +++ b/webkit/appcache/appcache_response_unittest.cc @@ -1,7 +1,11 @@ -// Copyright (c) 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. +#include <stack> +#include <string> +#include <utility> + #include "base/compiler_specific.h" #include "base/pickle.h" #include "base/thread.h" diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc index 7ea135e..5799cad 100644 --- a/webkit/appcache/appcache_url_request_job_unittest.cc +++ b/webkit/appcache/appcache_url_request_job_unittest.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stack> +#include <utility> + #include "base/compiler_specific.h" #include "base/pickle.h" #include "base/thread.h" |