summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--base/base_switches.cc5
-rw-r--r--base/base_switches.h1
-rw-r--r--base/file_descriptor_posix.h4
-rw-r--r--build/all.gyp1
-rw-r--r--chrome/DEPS1
-rw-r--r--chrome/browser/automation/automation_provider.h4
-rw-r--r--chrome/browser/automation/automation_resource_tracker.h2
-rw-r--r--chrome/browser/jsmessage_box_handler.h2
-rw-r--r--chrome/browser/jsmessage_box_handler_win.h2
-rw-r--r--chrome/browser/net/resolve_proxy_msg_helper.h2
-rw-r--r--chrome/browser/renderer_host/audio_renderer_host.h2
-rw-r--r--chrome/browser/renderer_host/mock_render_process_host.h2
-rw-r--r--chrome/browser/renderer_host/render_process_host.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h2
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h2
-rw-r--r--chrome/browser/sandbox_policy.cc2
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc2
-rw-r--r--chrome/browser/views/about_ipc_dialog.cc2
-rw-r--r--chrome/browser/views/about_ipc_dialog.h2
-rw-r--r--chrome/browser/worker_host/worker_process_host.h2
-rw-r--r--chrome/chrome.gyp60
-rw-r--r--chrome/chrome.sln24
-rw-r--r--chrome/common/child_process_host.cc3
-rw-r--r--chrome/common/child_process_host.h2
-rw-r--r--chrome/common/child_thread.cc3
-rw-r--r--chrome/common/child_thread.h2
-rw-r--r--chrome/common/chrome_counters.cc5
-rw-r--r--chrome/common/chrome_counters.h3
-rw-r--r--chrome/common/chrome_switches.cc13
-rw-r--r--chrome/common/chrome_switches.h6
-rw-r--r--chrome/common/common.vcproj64
-rw-r--r--chrome/common/common_message_utils.h138
-rw-r--r--chrome/common/file_descriptor_set_posix.cc (renamed from ipc/file_descriptor_set_posix.cc)2
-rw-r--r--chrome/common/file_descriptor_set_posix.h (renamed from ipc/file_descriptor_set_posix.h)6
-rw-r--r--chrome/common/file_descriptor_set_unittest.cc (renamed from ipc/file_descriptor_set_unittest.cc)2
-rw-r--r--chrome/common/ipc_channel.h (renamed from ipc/ipc_channel.h)8
-rw-r--r--chrome/common/ipc_channel_posix.cc (renamed from ipc/ipc_channel_posix.cc)14
-rw-r--r--chrome/common/ipc_channel_posix.h (renamed from ipc/ipc_channel_posix.h)10
-rw-r--r--chrome/common/ipc_channel_proxy.cc (renamed from ipc/ipc_channel_proxy.cc)6
-rw-r--r--chrome/common/ipc_channel_proxy.h (renamed from ipc/ipc_channel_proxy.h)8
-rw-r--r--chrome/common/ipc_channel_win.cc (renamed from ipc/ipc_channel_win.cc)10
-rw-r--r--chrome/common/ipc_channel_win.h (renamed from ipc/ipc_channel_win.h)8
-rw-r--r--chrome/common/ipc_fuzzing_tests.cc (renamed from ipc/ipc_fuzzing_tests.cc)17
-rw-r--r--chrome/common/ipc_logging.cc (renamed from ipc/ipc_logging.cc)31
-rw-r--r--chrome/common/ipc_logging.h (renamed from ipc/ipc_logging.h)16
-rw-r--r--chrome/common/ipc_maybe.h19
-rw-r--r--chrome/common/ipc_message.cc (renamed from ipc/ipc_message.cc)4
-rw-r--r--chrome/common/ipc_message.h (renamed from ipc/ipc_message.h)6
-rw-r--r--chrome/common/ipc_message_macros.h (renamed from ipc/ipc_message_macros.h)14
-rw-r--r--chrome/common/ipc_message_unittest.cc (renamed from chrome/common/gurl_serialisation_unittest.cc)6
-rw-r--r--chrome/common/ipc_message_utils.cc (renamed from chrome/common/common_message_utils.cc)75
-rw-r--r--chrome/common/ipc_message_utils.h (renamed from ipc/ipc_message_utils.h)135
-rw-r--r--chrome/common/ipc_send_fds_test.cc (renamed from ipc/ipc_send_fds_test.cc)6
-rw-r--r--chrome/common/ipc_sync_channel.cc (renamed from ipc/ipc_sync_channel.cc)4
-rw-r--r--chrome/common/ipc_sync_channel.h (renamed from ipc/ipc_sync_channel.h)8
-rw-r--r--chrome/common/ipc_sync_channel_unittest.cc (renamed from ipc/ipc_sync_channel_unittest.cc)18
-rw-r--r--chrome/common/ipc_sync_message.cc (renamed from ipc/ipc_sync_message.cc)2
-rw-r--r--chrome/common/ipc_sync_message.h (renamed from ipc/ipc_sync_message.h)8
-rw-r--r--chrome/common/ipc_sync_message_unittest.cc (renamed from ipc/ipc_sync_message_unittest.cc)14
-rw-r--r--chrome/common/ipc_sync_message_unittest.h (renamed from ipc/ipc_sync_message_unittest.h)2
-rw-r--r--chrome/common/ipc_test_sink.cc (renamed from ipc/ipc_test_sink.cc)2
-rw-r--r--chrome/common/ipc_test_sink.h (renamed from ipc/ipc_test_sink.h)8
-rw-r--r--chrome/common/ipc_tests.cc (renamed from ipc/ipc_tests.cc)9
-rw-r--r--chrome/common/ipc_tests.h (renamed from ipc/ipc_tests.h)6
-rw-r--r--chrome/common/ipc_tests.vcproj165
-rw-r--r--chrome/common/logging_chrome.cc21
-rw-r--r--chrome/common/message_router.h2
-rw-r--r--chrome/common/plugin_messages.h11
-rw-r--r--chrome/common/plugin_messages_internal.h2
-rw-r--r--chrome/common/render_messages.h10
-rw-r--r--chrome/common/render_messages_internal.h2
-rw-r--r--chrome/common/resource_dispatcher.h2
-rw-r--r--chrome/common/webkit_param_traits.h2
-rw-r--r--chrome/common/worker_messages.h11
-rw-r--r--chrome/common/worker_messages_internal.h2
-rw-r--r--chrome/plugin/npobject_proxy.h2
-rw-r--r--chrome/plugin/npobject_stub.h2
-rw-r--r--chrome/plugin/plugin_channel_base.cc2
-rw-r--r--chrome/plugin/plugin_channel_base.h2
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h2
-rw-r--r--chrome/plugin/webplugin_proxy.h2
-rw-r--r--chrome/renderer/automation/dom_automation_controller.h2
-rw-r--r--chrome/renderer/debug_message_handler.h2
-rw-r--r--chrome/renderer/devtools_agent.h2
-rw-r--r--chrome/renderer/devtools_messages.h7
-rw-r--r--chrome/renderer/devtools_messages_internal.h2
-rw-r--r--chrome/renderer/dom_ui_bindings.h2
-rw-r--r--chrome/renderer/external_host_bindings.h2
-rw-r--r--chrome/renderer/mock_render_thread.cc2
-rw-r--r--chrome/renderer/mock_render_thread.h2
-rw-r--r--chrome/renderer/render_process.cc4
-rw-r--r--chrome/renderer/render_thread_unittest.cc2
-rw-r--r--chrome/renderer/render_widget.h2
-rw-r--r--chrome/renderer/renderer_main_unittest.cc2
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h2
-rw-r--r--chrome/renderer/webworker_proxy.h2
-rw-r--r--chrome/test/automation/autocomplete_edit_proxy.h5
-rw-r--r--chrome/test/automation/automation_messages.h10
-rw-r--r--chrome/test/automation/automation_messages_internal.h2
-rw-r--r--chrome/test/automation/automation_proxy.h6
-rw-r--r--chrome/test/data/purify/ipc_tests.exe_UMR.txt134
-rw-r--r--chrome/test/unit/unittests.vcproj20
-rw-r--r--chrome/worker/webworkerclient_proxy.cc2
-rw-r--r--chrome/worker/webworkerclient_proxy.h2
-rw-r--r--ipc/ipc.gyp82
-rw-r--r--ipc/ipc_counters.cc27
-rw-r--r--ipc/ipc_counters.h22
-rw-r--r--ipc/ipc_message_utils.cc76
-rw-r--r--ipc/ipc_switches.cc17
-rw-r--r--ipc/ipc_switches.h19
112 files changed, 828 insertions, 730 deletions
diff --git a/DEPS b/DEPS
index f2313c0..3e3a96e 100644
--- a/DEPS
+++ b/DEPS
@@ -65,7 +65,6 @@ include_rules = [
# Everybody can use some things.
"+base",
"+build",
- "+ipc",
# For now, we allow ICU to be included by specifying "unicode/...", although
# this should probably change.
@@ -82,7 +81,6 @@ include_rules = [
skip_child_includes = [
"breakpad",
"gears",
- "ipc",
"sdch",
"skia",
"testing",
diff --git a/base/base_switches.cc b/base/base_switches.cc
index d54d458..77d263c 100644
--- a/base/base_switches.cc
+++ b/base/base_switches.cc
@@ -40,9 +40,4 @@ const wchar_t kEnableDCHECK[] = L"enable-dcheck";
// Available at http://www.adambarth.com/papers/2008/jackson-barth.pdf
const wchar_t kForceHTTPS[] = L"force-https";
-// Will add kDebugOnStart to every child processes. If a value is passed, it
-// will be used as a filter to determine if the child process should have the
-// kDebugOnStart flag passed on or not.
-const wchar_t kDebugChildren[] = L"debug-children";
-
} // namespace switches
diff --git a/base/base_switches.h b/base/base_switches.h
index 1ca56f4..97a3691 100644
--- a/base/base_switches.h
+++ b/base/base_switches.h
@@ -17,7 +17,6 @@ extern const wchar_t kNoErrorDialogs[];
extern const wchar_t kProcessType[];
extern const wchar_t kEnableDCHECK[];
extern const wchar_t kForceHTTPS[];
-extern const wchar_t kDebugChildren[];
} // namespace switches
diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h
index 5d6cbc6..0bcd4b6 100644
--- a/base/file_descriptor_posix.h
+++ b/base/file_descriptor_posix.h
@@ -12,8 +12,8 @@ namespace base {
// able to use template specialisation to special-case their handling.
//
// WARNING: (Chromium only) There are subtleties to consider if serialising
-// these objects over IPC. See comments in ipc_message_utils.h above the
-// template specialisation for this structure.
+// these objects over IPC. See comments in chrome/common/ipc_message_utils.h
+// above the template specialisation for this structure.
// -----------------------------------------------------------------------------
struct FileDescriptor {
FileDescriptor()
diff --git a/build/all.gyp b/build/all.gyp
index 9c95a8b..2d9ddff 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -22,7 +22,6 @@
'type': 'none',
'dependencies': [
'../base/base.gyp:*',
- '../ipc/ipc.gyp:*',
'../media/media.gyp:*',
'../net/net.gyp:*',
'../printing/printing.gyp:*',
diff --git a/chrome/DEPS b/chrome/DEPS
index b457d6a..0f6969f 100644
--- a/chrome/DEPS
+++ b/chrome/DEPS
@@ -1,5 +1,4 @@
include_rules = [
- "+ipc",
"+net",
"+printing",
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 77625e3..1bf0892 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -21,11 +21,11 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/notification_observer.h"
#include "chrome/test/automation/automation_messages.h"
#include "chrome/views/event.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_sync_channel.h"
#if defined(OS_WIN)
// TODO(port): enable these.
diff --git a/chrome/browser/automation/automation_resource_tracker.h b/chrome/browser/automation/automation_resource_tracker.h
index 3e626c3..53d80b9 100644
--- a/chrome/browser/automation/automation_resource_tracker.h
+++ b/chrome/browser/automation/automation_resource_tracker.h
@@ -8,8 +8,8 @@
#include <map>
#include "base/basictypes.h"
+#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_service.h"
-#include "ipc/ipc_message.h"
// Template trick so that AutomationResourceTracker can be used with non-pointer
// types.
diff --git a/chrome/browser/jsmessage_box_handler.h b/chrome/browser/jsmessage_box_handler.h
index 3055e06..149bfd7 100644
--- a/chrome/browser/jsmessage_box_handler.h
+++ b/chrome/browser/jsmessage_box_handler.h
@@ -7,7 +7,7 @@
#include <string>
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
class GURL;
class WebContents;
diff --git a/chrome/browser/jsmessage_box_handler_win.h b/chrome/browser/jsmessage_box_handler_win.h
index 04793e4..ff2b152 100644
--- a/chrome/browser/jsmessage_box_handler_win.h
+++ b/chrome/browser/jsmessage_box_handler_win.h
@@ -6,11 +6,11 @@
#define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_WIN_H_
#include "chrome/browser/jsmessage_box_handler.h"
+#include "chrome/common/ipc_message.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/views/window/app_modal_dialog_delegate.h"
#include "googleurl/src/gurl.h"
-#include "ipc/ipc_message.h"
class MessageBoxView;
class WebContents;
diff --git a/chrome/browser/net/resolve_proxy_msg_helper.h b/chrome/browser/net/resolve_proxy_msg_helper.h
index 99ef416..ee6f4af 100644
--- a/chrome/browser/net/resolve_proxy_msg_helper.h
+++ b/chrome/browser/net/resolve_proxy_msg_helper.h
@@ -8,7 +8,7 @@
#include <deque>
#include <string>
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "net/base/completion_callback.h"
#include "googleurl/src/gurl.h"
#include "net/proxy/proxy_service.h"
diff --git a/chrome/browser/renderer_host/audio_renderer_host.h b/chrome/browser/renderer_host/audio_renderer_host.h
index abc3e88..9ddeada0 100644
--- a/chrome/browser/renderer_host/audio_renderer_host.h
+++ b/chrome/browser/renderer_host/audio_renderer_host.h
@@ -42,7 +42,7 @@
#include "base/ref_counted.h"
#include "base/shared_memory.h"
#include "base/waitable_event.h"
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "media/audio/audio_output.h"
class AudioManager;
diff --git a/chrome/browser/renderer_host/mock_render_process_host.h b/chrome/browser/renderer_host/mock_render_process_host.h
index 7571097..9b63653 100644
--- a/chrome/browser/renderer_host/mock_render_process_host.h
+++ b/chrome/browser/renderer_host/mock_render_process_host.h
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "chrome/browser/renderer_host/render_process_host.h"
-#include "ipc/ipc_test_sink.h"
+#include "chrome/common/ipc_test_sink.h"
class TransportDIB;
diff --git a/chrome/browser/renderer_host/render_process_host.h b/chrome/browser/renderer_host/render_process_host.h
index 346213b..6e59166 100644
--- a/chrome/browser/renderer_host/render_process_host.h
+++ b/chrome/browser/renderer_host/render_process_host.h
@@ -10,8 +10,8 @@
#include "base/id_map.h"
#include "base/process.h"
#include "base/scoped_ptr.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/transport_dib.h"
-#include "ipc/ipc_sync_channel.h"
class Profile;
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index f09c829..cac1f4e 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -11,8 +11,8 @@
#include "base/gfx/size.h"
#include "base/scoped_ptr.h"
#include "base/timer.h"
+#include "chrome/common/ipc_channel.h"
#include "chrome/common/native_web_keyboard_event.h"
-#include "ipc/ipc_channel.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
#include "webkit/glue/webtextdirection.h"
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 7e08f89..07c532c 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -24,7 +24,7 @@
#include "chrome/browser/renderer_host/resource_handler.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/filter_policy.h"
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "net/url_request/url_request.h"
#include "webkit/glue/resource_type.h"
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 5b25f63..db7c60b 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -19,10 +19,10 @@
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/render_widget_helper.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
+#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/transport_dib.h"
-#include "ipc/ipc_channel_proxy.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#if defined(OS_WIN)
diff --git a/chrome/browser/sandbox_policy.cc b/chrome/browser/sandbox_policy.cc
index f44707c..24d3c2e 100644
--- a/chrome/browser/sandbox_policy.cc
+++ b/chrome/browser/sandbox_policy.cc
@@ -19,9 +19,9 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/debug_flags.h"
+#include "chrome/common/ipc_logging.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/win_util.h"
-#include "ipc/ipc_logging.h"
#include "sandbox/src/sandbox.h"
#include "webkit/glue/plugins/plugin_list.h"
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index a1ed0c8..8dab8c6 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -11,10 +11,10 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/test_web_contents.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/ipc_channel.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/render_messages.h"
#include "chrome/test/testing_profile.h"
-#include "ipc/ipc_channel.h"
#include "testing/gtest/include/gtest/gtest.h"
static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params,
diff --git a/chrome/browser/views/about_ipc_dialog.cc b/chrome/browser/views/about_ipc_dialog.cc
index be6cb26..6bbd356 100644
--- a/chrome/browser/views/about_ipc_dialog.cc
+++ b/chrome/browser/views/about_ipc_dialog.cc
@@ -6,7 +6,7 @@
// IPC_MESSAGE_LOG_ENABLED. We need to use it to define
// IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
// ViewMsgLog et al. functions.
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#ifdef IPC_MESSAGE_LOG_ENABLED
#define IPC_MESSAGE_MACROS_LOG_ENABLED
diff --git a/chrome/browser/views/about_ipc_dialog.h b/chrome/browser/views/about_ipc_dialog.h
index ff9f3df..92cc284 100644
--- a/chrome/browser/views/about_ipc_dialog.h
+++ b/chrome/browser/views/about_ipc_dialog.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_VIEWS_ABOUT_IPC_DIALOG_H_
#include "base/singleton.h"
-#include "ipc/ipc_logging.h"
+#include "chrome/common/ipc_logging.h"
#include "chrome/views/controls/button/button.h"
#include "chrome/views/controls/table/table_view.h"
#include "chrome/views/window/dialog_delegate.h"
diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h
index 0438076..cf8072c 100644
--- a/chrome/browser/worker_host/worker_process_host.h
+++ b/chrome/browser/worker_host/worker_process_host.h
@@ -9,8 +9,8 @@
#include "base/basictypes.h"
#include "chrome/common/child_process_host.h"
+#include "chrome/common/ipc_channel.h"
#include "googleurl/src/gurl.h"
-#include "ipc/ipc_channel.h"
class ResourceMessageFilter;
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index b7e858f..199a69d3 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -83,7 +83,6 @@
'../base/base.gyp:base',
'../base/base.gyp:base_gfx',
'../build/temp_gyp/googleurl.gyp:googleurl',
- '../ipc/ipc.gyp:ipc',
'../net/net.gyp:net',
'../skia/skia.gyp:skia',
'../third_party/icu38/icu38.gyp:icui18n',
@@ -164,15 +163,34 @@
'common/classfactory.h',
'common/clipboard_service.h',
'common/common_glue.cc',
- 'common/common_message_utils.cc',
'common/debug_flags.cc',
'common/debug_flags.h',
'common/drag_drop_types.cc',
'common/drag_drop_types.h',
'common/env_vars.cc',
'common/env_vars.h',
+ 'common/file_descriptor_set_posix.cc',
+ 'common/file_descriptor_set_posix.h',
'common/filter_policy.h',
'common/gears_api.h',
+ 'common/ipc_channel.h',
+ 'common/ipc_channel_posix.cc',
+ 'common/ipc_channel_posix.h',
+ 'common/ipc_channel_proxy.cc',
+ 'common/ipc_channel_proxy.h',
+ 'common/ipc_channel_win.cc',
+ 'common/ipc_channel_win.h',
+ 'common/ipc_logging.cc',
+ 'common/ipc_logging.h',
+ 'common/ipc_message.cc',
+ 'common/ipc_message.h',
+ 'common/ipc_message_macros.h',
+ 'common/ipc_message_utils.cc',
+ 'common/ipc_message_utils.h',
+ 'common/ipc_sync_channel.cc',
+ 'common/ipc_sync_channel.h',
+ 'common/ipc_sync_message.cc',
+ 'common/ipc_sync_message.h',
'common/json_value_serializer.cc',
'common/json_value_serializer.h',
'common/jstemplate_builder.cc',
@@ -1721,8 +1739,8 @@
'browser/renderer_host/test_render_view_host.h',
'browser/tab_contents/test_web_contents.cc',
'browser/tab_contents/test_web_contents.h',
- '../ipc/ipc_test_sink.cc',
- '../ipc/ipc_test_sink.h',
+ 'common/ipc_test_sink.cc',
+ 'common/ipc_test_sink.h',
'renderer/mock_render_process.h',
'renderer/mock_render_thread.cc',
'renderer/mock_render_thread.h',
@@ -1820,6 +1838,37 @@
],
},
{
+ 'target_name': 'ipc_tests',
+ 'type': 'executable',
+ 'dependencies': [
+ 'browser',
+ 'common',
+ 'renderer',
+ 'test_support_unit',
+ '../base/base.gyp:base',
+ '../testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'common/ipc_fuzzing_tests.cc',
+ 'common/ipc_message_unittest.cc',
+ 'common/ipc_send_fds_test.cc',
+ 'common/ipc_sync_channel_unittest.cc',
+ 'common/ipc_sync_channel_unittest.h',
+ 'common/ipc_sync_message_unittest.cc',
+ 'common/ipc_sync_message_unittest.h',
+ 'common/ipc_tests.cc',
+ 'common/ipc_tests.h',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'dependencies': [
+ 'views',
+ '../build/linux/system.gyp:gtk',
+ ],
+ }],
+ ],
+ },
+ {
'target_name': 'ui_tests',
'type': 'executable',
'dependencies': [
@@ -2109,11 +2158,11 @@
'common/chrome_plugin_unittest.cc',
'common/extensions/url_pattern_unittest.cc',
'common/extensions/user_script_unittest.cc',
+ 'common/file_descriptor_set_unittest.cc',
'common/gfx/chrome_font_unittest.cc',
'common/gfx/emf_unittest.cc',
'common/gfx/icon_util_unittest.cc',
'common/gfx/text_elider_unittest.cc',
- 'common/gurl_serialisation_unittest.cc',
'common/json_value_serializer_unittest.cc',
'common/l10n_util_unittest.cc',
'common/mru_cache_unittest.cc',
@@ -2195,6 +2244,7 @@
'third_party/wtl/include',
],
'sources!': [
+ 'common/file_descriptor_set_unittest.cc',
'common/net/url_util_unittest.cc',
],
'dependencies': [
diff --git a/chrome/chrome.sln b/chrome/chrome.sln
index f6f1946..c1002d1 100644
--- a/chrome/chrome.sln
+++ b/chrome/chrome.sln
@@ -20,9 +20,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "renderer", "renderer\render
{D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipc_tests", "common\ipc_tests.vcproj", "{B92AE829-E1CD-4781-824A-DCB1603A1672}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1832A374-8A74-4F9E-B536-69A699B3E165} = {1832A374-8A74-4F9E-B536-69A699B3E165}
+ {899F1280-3441-4D1F-BA04-CCD6208D9146} = {899F1280-3441-4D1F-BA04-CCD6208D9146}
+ {8C27D792-2648-4F5E-9ED0-374276327308} = {8C27D792-2648-4F5E-9ED0-374276327308}
+ {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B} = {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcproj", "{899F1280-3441-4D1F-BA04-CCD6208D9146}"
ProjectSection(ProjectDependencies) = postProject
- {3476F599-9139-8A7F-8043-1345F4D9571D} = {3476F599-9139-8A7F-8043-1345F4D9571D}
{B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {B95AB527-F7DB-41E9-AD91-EB51EE0F56BE}
{D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28}
EndProjectSection
@@ -593,19 +600,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media_unittests", "..\media
{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B} = {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipc", "..\ipc\ipc.vcproj", "{3476F599-9139-8A7F-8043-1345F4D9571D}"
- ProjectSection(ProjectDependencies) = postProject
- {1832A374-8A74-4F9E-B536-69A699B3E165} = {1832A374-8A74-4F9E-B536-69A699B3E165}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipc_tests", "..\ipc\ipc_tests.vcproj", "{9EFCEB4B-067F-C8F0-790F-6F698DC2E248}"
- ProjectSection(ProjectDependencies) = postProject
- {1832A374-8A74-4F9E-B536-69A699B3E165} = {1832A374-8A74-4F9E-B536-69A699B3E165}
- {3476F599-9139-8A7F-8043-1345F4D9571D} = {3476F599-9139-8A7F-8043-1345F4D9571D}
- {8C27D792-2648-4F5E-9ED0-374276327308} = {8C27D792-2648-4F5E-9ED0-374276327308}
- {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B} = {BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "..\base\base.vcproj", "{1832A374-8A74-4F9E-B536-69A699B3E165}"
ProjectSection(ProjectDependencies) = postProject
{8C27D792-2648-4F5E-9ED0-374276327308} = {8C27D792-2648-4F5E-9ED0-374276327308}
@@ -3091,8 +3085,6 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {9EFCEB4B-067F-C8F0-790F-6F698DC2E248} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
- {3476F599-9139-8A7F-8043-1345F4D9571D} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{0026A376-C4F1-4575-A1BA-578C69F07013} = {EB684A4B-98F7-4E68-8EA7-EA74ACF7060B}
{018D4F38-6272-448F-A864-976DA09F05D0} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{0557BC3C-DE87-4127-BDAA-9BD9BDB13FB4} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
diff --git a/chrome/common/child_process_host.cc b/chrome/common/child_process_host.cc
index dc7f1e5..7f934b0 100644
--- a/chrome/common/child_process_host.cc
+++ b/chrome/common/child_process_host.cc
@@ -11,13 +11,12 @@
#include "base/singleton.h"
#include "base/waitable_event.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_logging.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/process_watcher.h"
#include "chrome/common/result_codes.h"
-#include "ipc/ipc_logging.h"
namespace {
diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h
index 1aef54c..d4d2dd9 100644
--- a/chrome/common/child_process_host.h
+++ b/chrome/common/child_process_host.h
@@ -14,7 +14,7 @@
#include "base/waitable_event_watcher.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/child_process_info.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
class NotificationType;
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc
index 527c58f..94b3186 100644
--- a/chrome/common/child_thread.cc
+++ b/chrome/common/child_thread.cc
@@ -6,11 +6,10 @@
#include "base/string_util.h"
#include "base/command_line.h"
-#include "chrome/common/common_message_utils.h"
#include "chrome/common/child_process.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/ipc_logging.h"
#include "chrome/common/plugin_messages.h"
-#include "ipc/ipc_logging.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h
index a4f8603..66fcc09 100644
--- a/chrome/common/child_thread.h
+++ b/chrome/common/child_thread.h
@@ -6,7 +6,7 @@
#define CHROME_COMMON_CHILD_THREAD_H_
#include "base/thread.h"
-#include "ipc/ipc_sync_channel.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/message_router.h"
#include "chrome/common/resource_dispatcher.h"
diff --git a/chrome/common/chrome_counters.cc b/chrome/common/chrome_counters.cc
index fea0906..98a977b 100644
--- a/chrome/common/chrome_counters.cc
+++ b/chrome/common/chrome_counters.cc
@@ -19,6 +19,11 @@ namespace chrome {
// we'd leak the extraneous StatsCounter object once, and that
// would be it. But these are small objects, so this is ok.
+StatsCounter& Counters::ipc_send_counter() {
+ static StatsCounter* ctr = new StatsCounter("IPC.SendMsgCount");
+ return *ctr;
+}
+
StatsCounterTimer& Counters::chrome_main() {
static StatsCounterTimer* ctr = new StatsCounterTimer("Chrome.Init");
return *ctr;
diff --git a/chrome/common/chrome_counters.h b/chrome/common/chrome_counters.h
index 14cfa21..c7975f85 100644
--- a/chrome/common/chrome_counters.h
+++ b/chrome/common/chrome_counters.h
@@ -15,6 +15,9 @@ namespace chrome {
class Counters {
public:
+ // The number of messages sent on IPC channels.
+ static StatsCounter& ipc_send_counter();
+
// The amount of time spent in chrome initialization.
static StatsCounterTimer& chrome_main();
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 350b2a0..c32cbb5 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -50,6 +50,10 @@ const wchar_t kTestShellStartupDialog[] = L"testshell-startup-dialog";
// --plugin-launcher="path\to\purify /Run=yes"
const wchar_t kPluginLauncher[] = L"plugin-launcher";
+// The value of this switch tells the child process which
+// IPC channel the browser expects to use to communicate with it.
+const wchar_t kProcessChannelID[] = L"channel";
+
// The value of this switch tells the app to listen for and broadcast
// testing-related messages on IPC channel with the given ID.
const wchar_t kTestingChannelID[] = L"testing-channel";
@@ -152,6 +156,11 @@ const wchar_t kCountry[] = L"country";
// language[-country] where language is the 2 letter code from ISO-639.
const wchar_t kLang[] = L"lang";
+// Will add kDebugOnStart to every child processes. If a value is passed, it
+// will be used as a filter to determine if the child process should have the
+// kDebugOnStart flag passed on or not.
+const wchar_t kDebugChildren[] = L"debug-children";
+
// Will add kWaitForDebugger to every child processes. If a value is passed, it
// will be used as a filter to determine if the child process should have the
// kWaitForDebugger flag passed on or not.
@@ -382,6 +391,10 @@ const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix";
// Temparary option for new ftp implemetation.
const wchar_t kNewFtp[] = L"new-ftp";
+// On POSIX only: use FIFO for IPC channels so that "unrelated" process
+// can connect to a channel, provided it knows its name. For debugging purposes.
+const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo";
+
// If this flag is set open out of process developer tools window instead of
// Console Debugger when user clicks "Debug JavaScript".
const wchar_t kEnableOutOfProcessDevTools[] = L"enable-oop-devtools";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index f6d085b..8b51a7d 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -7,7 +7,7 @@
#ifndef CHROME_COMMON_CHROME_SWITCHES_H__
#define CHROME_COMMON_CHROME_SWITCHES_H__
-#include "ipc/ipc_switches.h"
+#include "base/base_switches.h"
namespace switches {
@@ -23,6 +23,7 @@ extern const wchar_t kPluginStartupDialog[];
extern const wchar_t kTestShellStartupDialog[];
extern const wchar_t kPluginLauncher[];
+extern const wchar_t kProcessChannelID[];
extern const wchar_t kTestingChannelID[];
extern const wchar_t kHomePage[];
extern const wchar_t kRendererProcess[];
@@ -50,6 +51,7 @@ extern const wchar_t kUserAgent[];
extern const wchar_t kJavaScriptFlags[];
extern const wchar_t kCountry[];
extern const wchar_t kLang[];
+extern const wchar_t kDebugChildren[];
extern const wchar_t kWaitForDebuggerChildren[];
extern const wchar_t kLogFilterPrefix[];
@@ -148,6 +150,8 @@ extern const wchar_t kRendererCmdPrefix[];
extern const wchar_t kNewFtp[];
+extern const wchar_t kIPCUseFIFO[];
+
extern const wchar_t kEnableOutOfProcessDevTools[];
extern const wchar_t kEnableWebWorkers[];
diff --git a/chrome/common/common.vcproj b/chrome/common/common.vcproj
index 5f3837a..f392f7d 100644
--- a/chrome/common/common.vcproj
+++ b/chrome/common/common.vcproj
@@ -225,6 +225,66 @@
Name="ipc"
>
<File
+ RelativePath=".\ipc_channel.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_channel_proxy.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_channel_proxy.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_channel_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_logging.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_logging.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_message.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_message.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_message_macros.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_message_utils.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_message_utils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_sync_channel.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_sync_channel.h"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_sync_message.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_sync_message.h"
+ >
+ </File>
+ <File
RelativePath=".\plugin_messages.h"
>
</File>
@@ -398,10 +458,6 @@
>
</File>
<File
- RelativePath=".\common_message_utils.cc"
- >
- </File>
- <File
RelativePath=".\debug_flags.cc"
>
</File>
diff --git a/chrome/common/common_message_utils.h b/chrome/common/common_message_utils.h
deleted file mode 100644
index 81178db..0000000
--- a/chrome/common/common_message_utils.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-#ifndef CHROME_COMMON_COMMON_MESSAGE_UTILS_H_
-#define CHROME_COMMON_COMMON_MESSAGE_UTILS_H_
-
-#include "chrome/common/thumbnail_score.h"
-#include "chrome/common/transport_dib.h"
-#include "ipc/ipc_message_utils.h"
-#include "webkit/glue/webcursor.h"
-#include "webkit/glue/window_open_disposition.h"
-
-// Forward declarations.
-class GURL;
-class SkBitmap;
-
-namespace webkit_glue {
-struct WebApplicationInfo;
-} // namespace webkit_glue
-
-namespace IPC {
-
-template <>
-struct ParamTraits<SkBitmap> {
- typedef SkBitmap param_type;
- static void Write(Message* m, const param_type& p);
-
- // Note: This function expects parameter |r| to be of type &SkBitmap since
- // r->SetConfig() and r->SetPixels() are called.
- static bool Read(const Message* m, void** iter, param_type* r);
-
- static void Log(const param_type& p, std::wstring* l);
-};
-
-template<>
-struct ParamTraits<ThumbnailScore> {
- typedef ThumbnailScore param_type;
- static void Write(Message* m, const param_type& p) {
- IPC::ParamTraits<double>::Write(m, p.boring_score);
- IPC::ParamTraits<bool>::Write(m, p.good_clipping);
- IPC::ParamTraits<bool>::Write(m, p.at_top);
- IPC::ParamTraits<base::Time>::Write(m, p.time_at_snapshot);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- double boring_score;
- bool good_clipping, at_top;
- base::Time time_at_snapshot;
- if (!IPC::ParamTraits<double>::Read(m, iter, &boring_score) ||
- !IPC::ParamTraits<bool>::Read(m, iter, &good_clipping) ||
- !IPC::ParamTraits<bool>::Read(m, iter, &at_top) ||
- !IPC::ParamTraits<base::Time>::Read(m, iter, &time_at_snapshot))
- return false;
-
- r->boring_score = boring_score;
- r->good_clipping = good_clipping;
- r->at_top = at_top;
- r->time_at_snapshot = time_at_snapshot;
- return true;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(StringPrintf(L"(%f, %d, %d)",
- p.boring_score, p.good_clipping, p.at_top));
- }
-};
-
-template <>
-struct ParamTraits<GURL> {
- typedef GURL param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* p);
- static void Log(const param_type& p, std::wstring* l);
-};
-
-template <>
-struct ParamTraits<WindowOpenDisposition> {
- typedef WindowOpenDisposition param_type;
- static void Write(Message* m, const param_type& p) {
- m->WriteInt(p);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- int temp;
- bool res = m->ReadInt(iter, &temp);
- *r = static_cast<WindowOpenDisposition>(temp);
- return res;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(StringPrintf(L"%d", p));
- }
-};
-
-template <>
-struct ParamTraits<WebCursor> {
- typedef WebCursor param_type;
- static void Write(Message* m, const param_type& p) {
- p.Serialize(m);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- return r->Deserialize(m, iter);
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<WebCursor>");
- }
-};
-
-template <>
-struct ParamTraits<webkit_glue::WebApplicationInfo> {
- typedef webkit_glue::WebApplicationInfo param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, void** iter, param_type* r);
- static void Log(const param_type& p, std::wstring* l);
-};
-
-#if defined(OS_WIN)
-template<>
-struct ParamTraits<TransportDIB::Id> {
- typedef TransportDIB::Id param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.handle);
- WriteParam(m, p.sequence_num);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- return (ReadParam(m, iter, &r->handle) &&
- ReadParam(m, iter, &r->sequence_num));
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"TransportDIB(");
- LogParam(p.handle, l);
- l->append(L", ");
- LogParam(p.sequence_num, l);
- l->append(L")");
- }
-};
-#endif
-
-} // namespace IPC
-
-#endif // CHROME_COMMON_COMMON_MESSAGE_UTILS_H_
diff --git a/ipc/file_descriptor_set_posix.cc b/chrome/common/file_descriptor_set_posix.cc
index 3b04553..b57c007 100644
--- a/ipc/file_descriptor_set_posix.cc
+++ b/chrome/common/file_descriptor_set_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/file_descriptor_set_posix.h"
+#include "chrome/common/file_descriptor_set_posix.h"
#include "base/logging.h"
diff --git a/ipc/file_descriptor_set_posix.h b/chrome/common/file_descriptor_set_posix.h
index c3d26ba8..342e6d9 100644
--- a/ipc/file_descriptor_set_posix.h
+++ b/chrome/common/file_descriptor_set_posix.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_FILE_DESCRIPTOR_SET_POSIX_H_
-#define IPC_FILE_DESCRIPTOR_SET_POSIX_H_
+#ifndef CHROME_COMMON_FILE_DESCRIPTOR_SET_POSIX_H_
+#define CHROME_COMMON_FILE_DESCRIPTOR_SET_POSIX_H_
#include <vector>
@@ -105,4 +105,4 @@ class FileDescriptorSet : public base::RefCountedThreadSafe<FileDescriptorSet> {
DISALLOW_COPY_AND_ASSIGN(FileDescriptorSet);
};
-#endif // IPC_FILE_DESCRIPTOR_SET_POSIX_H_
+#endif // CHROME_COMMON_FILE_DESCRIPTOR_SET_POSIX_H_
diff --git a/ipc/file_descriptor_set_unittest.cc b/chrome/common/file_descriptor_set_unittest.cc
index 0d158b2..89144a5 100644
--- a/ipc/file_descriptor_set_unittest.cc
+++ b/chrome/common/file_descriptor_set_unittest.cc
@@ -8,7 +8,7 @@
#include <fcntl.h>
#include "base/basictypes.h"
-#include "ipc/file_descriptor_set_posix.h"
+#include "chrome/common/file_descriptor_set_posix.h"
#include "testing/gtest/include/gtest/gtest.h"
// The FileDescriptorSet will try and close some of the descriptor numbers
diff --git a/ipc/ipc_channel.h b/chrome/common/ipc_channel.h
index 1ecffdf..9b7f8b2 100644
--- a/ipc/ipc_channel.h
+++ b/chrome/common/ipc_channel.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_CHANNEL_H_
-#define IPC_IPC_CHANNEL_H_
+#ifndef CHROME_COMMON_IPC_CHANNEL_H_
+#define CHROME_COMMON_IPC_CHANNEL_H_
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
namespace IPC {
@@ -120,4 +120,4 @@ class Channel : public Message::Sender {
} // namespace IPC
-#endif // IPC_IPC_CHANNEL_H_
+#endif // CHROME_COMMON_IPC_CHANNEL_H_
diff --git a/ipc/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc
index 96209a0..23c008a 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/chrome/common/ipc_channel_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_channel_posix.h"
+#include "chrome/common/ipc_channel_posix.h"
#include <errno.h>
#include <fcntl.h>
@@ -22,11 +22,11 @@
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/singleton.h"
-#include "ipc/ipc_counters.h"
-#include "ipc/ipc_switches.h"
-#include "ipc/file_descriptor_set_posix.h"
-#include "ipc/ipc_logging.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/chrome_counters.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/file_descriptor_set_posix.h"
+#include "chrome/common/ipc_logging.h"
+#include "chrome/common/ipc_message_utils.h"
namespace IPC {
@@ -634,7 +634,7 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() {
}
bool Channel::ChannelImpl::Send(Message* message) {
- Counters::ipc_send_counter().Increment();
+ chrome::Counters::ipc_send_counter().Increment();
#ifdef IPC_MESSAGE_DEBUG_EXTRA
DLOG(INFO) << "sending message @" << message << " on channel @" << this
<< " with type " << message->type()
diff --git a/ipc/ipc_channel_posix.h b/chrome/common/ipc_channel_posix.h
index 53fba1b9..fbdd59b 100644
--- a/ipc/ipc_channel_posix.h
+++ b/chrome/common/ipc_channel_posix.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_CHANNEL_POSIX_H_
-#define IPC_IPC_CHANNEL_POSIX_H_
+#ifndef CHROME_COMMON_IPC_CHANNEL_POSIX_H_
+#define CHROME_COMMON_IPC_CHANNEL_POSIX_H_
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include <sys/socket.h> // for CMSG macros
@@ -14,7 +14,7 @@
#include <vector>
#include "base/message_loop.h"
-#include "ipc/file_descriptor_set_posix.h"
+#include "chrome/common/file_descriptor_set_posix.h"
namespace IPC {
@@ -109,4 +109,4 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher {
} // namespace IPC
-#endif // IPC_IPC_CHANNEL_POSIX_H_
+#endif // CHROME_COMMON_IPC_CHANNEL_POSIX_H_
diff --git a/ipc/ipc_channel_proxy.cc b/chrome/common/ipc_channel_proxy.cc
index a07c677..a9def01 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/chrome/common/ipc_channel_proxy.cc
@@ -4,9 +4,9 @@
#include "base/message_loop.h"
#include "base/thread.h"
-#include "ipc/ipc_channel_proxy.h"
-#include "ipc/ipc_logging.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_channel_proxy.h"
+#include "chrome/common/ipc_logging.h"
+#include "chrome/common/ipc_message_utils.h"
namespace IPC {
diff --git a/ipc/ipc_channel_proxy.h b/chrome/common/ipc_channel_proxy.h
index 7f78a7e..80a9807 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/chrome/common/ipc_channel_proxy.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_CHANNEL_PROXY_H__
-#define IPC_IPC_CHANNEL_PROXY_H__
+#ifndef CHROME_COMMON_IPC_CHANNEL_PROXY_H__
+#define CHROME_COMMON_IPC_CHANNEL_PROXY_H__
#include <vector>
#include "base/lock.h"
#include "base/ref_counted.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
class MessageLoop;
@@ -203,4 +203,4 @@ class ChannelProxy : public Message::Sender {
} // namespace IPC
-#endif // IPC_IPC_CHANNEL_PROXY_H__
+#endif // CHROME_COMMON_IPC_CHANNEL_PROXY_H__
diff --git a/ipc/ipc_channel_win.cc b/chrome/common/ipc_channel_win.cc
index 950b140..38e442a 100644
--- a/ipc/ipc_channel_win.cc
+++ b/chrome/common/ipc_channel_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_channel_win.h"
+#include "chrome/common/ipc_channel_win.h"
#include <windows.h>
#include <sstream>
@@ -11,9 +11,9 @@
#include "base/logging.h"
#include "base/non_thread_safe.h"
#include "base/win_util.h"
-#include "ipc/ipc_counters.h"
-#include "ipc/ipc_logging.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/chrome_counters.h"
+#include "chrome/common/ipc_logging.h"
+#include "chrome/common/ipc_message_utils.h"
namespace IPC {
//------------------------------------------------------------------------------
@@ -83,7 +83,7 @@ void Channel::ChannelImpl::Close() {
bool Channel::ChannelImpl::Send(Message* message) {
DCHECK(thread_check_->CalledOnValidThread());
- Counters::ipc_send_counter().Increment();
+ chrome::Counters::ipc_send_counter().Increment();
#ifdef IPC_MESSAGE_DEBUG_EXTRA
DLOG(INFO) << "sending message @" << message << " on channel @" << this
<< " with type " << message->type()
diff --git a/ipc/ipc_channel_win.h b/chrome/common/ipc_channel_win.h
index 998b7f8..2a601e1 100644
--- a/ipc/ipc_channel_win.h
+++ b/chrome/common/ipc_channel_win.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_CHANNEL_WIN_H_
-#define IPC_IPC_CHANNEL_WIN_H_
+#ifndef CHROME_COMMON_IPC_CHANNEL_WIN_H_
+#define CHROME_COMMON_IPC_CHANNEL_WIN_H_
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include <queue>
#include <string>
@@ -82,4 +82,4 @@ class Channel::ChannelImpl : public MessageLoopForIO::IOHandler {
} // namespace IPC
-#endif // IPC_IPC_CHANNEL_WIN_H_
+#endif // CHROME_COMMON_IPC_CHANNEL_WIN_H_
diff --git a/ipc/ipc_fuzzing_tests.cc b/chrome/common/ipc_fuzzing_tests.cc
index 6b4f899..8148723 100644
--- a/ipc/ipc_fuzzing_tests.cc
+++ b/chrome/common/ipc_fuzzing_tests.cc
@@ -10,10 +10,10 @@
#include "base/message_loop.h"
#include "base/platform_thread.h"
#include "base/process_util.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_channel_proxy.h"
-#include "ipc/ipc_message_utils.h"
-#include "ipc/ipc_tests.h"
+#include "chrome/common/ipc_channel.h"
+#include "chrome/common/ipc_channel_proxy.h"
+#include "chrome/common/ipc_message_utils.h"
+#include "chrome/common/ipc_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"
@@ -98,13 +98,8 @@ TEST(IPCMessageIntegrity, ReadVectorTooLarge2) {
// We don't actually use the messages defined in this file, but we do this
// to get to the IPC macros.
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "ipc/ipc_sync_message_unittest.h"
-#endif
-#define MESSAGES_INTERNAL_FILE "ipc/ipc_sync_message_unittest.h"
-#include "ipc/ipc_message_macros.h"
+#define MESSAGES_INTERNAL_FILE "chrome/common/ipc_sync_message_unittest.h"
+#include "chrome/common/ipc_message_macros.h"
enum IPCMessageIds {
UNUSED_IPC_TYPE,
diff --git a/ipc/ipc_logging.cc b/chrome/common/ipc_logging.cc
index baa9cc30f..cb63533 100644
--- a/ipc/ipc_logging.cc
+++ b/chrome/common/ipc_logging.cc
@@ -2,7 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_logging.h"
+#include "chrome/common/ipc_logging.h"
+
+#if defined(OS_POSIX)
+#ifdef IPC_MESSAGE_LOG_ENABLED
+// This will cause render_messages.h etc to define ViewMsgLog and friends.
+#define IPC_MESSAGE_MACROS_LOG_ENABLED
+#endif
+#endif
#include "base/command_line.h"
#include "base/logging.h"
@@ -12,9 +19,21 @@
#include "base/time.h"
#include "base/waitable_event.h"
#include "base/waitable_event_watcher.h"
-#include "ipc/ipc_sync_message.h"
-#include "ipc/ipc_switches.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/ipc_sync_message.h"
+#include "chrome/common/ipc_message_utils.h"
+
+// This include list should contain all _messages.h header files so that they
+// can get *MsgLog function etc. This makes ipc logs much more informative.
+#include "chrome/common/render_messages.h"
+#include "chrome/test/automation/automation_messages.h"
+
+#if defined(OS_WIN)
+// Pulling this file in Mac/Linux causes a lot of binaries to need to bring in
+// WebKit and all the dependencies, which results in a very large number of
+// linker errors.
+#include "chrome/common/plugin_messages.h"
+#endif
#if defined(OS_POSIX)
#include "base/string_util.h"
@@ -82,6 +101,7 @@ Logging::Logging()
#elif defined(OS_POSIX)
if (getenv("CHROME_IPC_LOGGING"))
enabled_ = true;
+ SetLoggerFunctions(g_log_function_mapping);
#endif
MessageLoop::current()->AddDestructionObserver(this);
@@ -109,7 +129,6 @@ void Logging::WillDestroyCurrentMessageLoop() {
watcher_.StopWatching();
}
-// static
void Logging::SetLoggerFunctions(LogFunction *functions) {
log_function_mapping_ = functions;
}
@@ -296,6 +315,6 @@ void GenerateLogData(const std::wstring& channel, const Message& message,
}
}
-} // namespace IPC
+}
#endif // IPC_MESSAGE_LOG_ENABLED
diff --git a/ipc/ipc_logging.h b/chrome/common/ipc_logging.h
index 4d8f81d4d..cfdcf21 100644
--- a/ipc/ipc_logging.h
+++ b/chrome/common/ipc_logging.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_LOGGING_H_
-#define IPC_IPC_LOGGING_H_
+#ifndef CHROME_COMMON_IPC_LOGGING_H_
+#define CHROME_COMMON_IPC_LOGGING_H_
-#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
+#include "chrome/common/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
#ifdef IPC_MESSAGE_LOG_ENABLED
@@ -13,7 +13,7 @@
#include "base/message_loop.h"
#include "base/singleton.h"
#include "base/waitable_event_watcher.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
class MessageLoop;
@@ -73,9 +73,9 @@ class Logging : public base::WaitableEventWatcher::Delegate,
void WillDestroyCurrentMessageLoop();
typedef void (*LogFunction)(uint16 type,
- std::wstring* name,
- const Message* msg,
- std::wstring* params);
+ std::wstring* name,
+ const Message* msg,
+ std::wstring* params);
static void SetLoggerFunctions(LogFunction *functions);
@@ -110,4 +110,4 @@ class Logging : public base::WaitableEventWatcher::Delegate,
#endif // IPC_MESSAGE_LOG_ENABLED
-#endif // IPC_IPC_LOGGING_H_
+#endif // CHROME_COMMON_IPC_LOGGING_H_
diff --git a/chrome/common/ipc_maybe.h b/chrome/common/ipc_maybe.h
new file mode 100644
index 0000000..de45dc0
--- /dev/null
+++ b/chrome/common/ipc_maybe.h
@@ -0,0 +1,19 @@
+#ifndef CHROME_COMMON_MAYBE_H_
+#define CHROME_COMMON_MAYBE_H_
+
+namespace IPC {
+
+// The Maybe type can be used to avoid serialising a type when it's invalid.
+// This is most useful in conjunction with FileDescriptor, as there's no
+// possible invalid value which can be serialised (one can type to use -1, but
+// the IPC channel will fail). It may also be useful if the invalid value is
+// otherwise expensive to serialise.
+template<typename A>
+struct Maybe {
+ bool valid;
+ A value;
+};
+
+} // namespace IPC
+
+#endif // CHROME_COMMON_MAYBE_H_
diff --git a/ipc/ipc_message.cc b/chrome/common/ipc_message.cc
index 7a2b5cd..d7cc49d 100644
--- a/ipc/ipc_message.cc
+++ b/chrome/common/ipc_message.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "base/logging.h"
#include "build/build_config.h"
#if defined(OS_POSIX)
-#include "ipc/file_descriptor_set_posix.h"
+#include "chrome/common/file_descriptor_set_posix.h"
#endif
namespace IPC {
diff --git a/ipc/ipc_message.h b/chrome/common/ipc_message.h
index 6357c0b..af4a0df 100644
--- a/ipc/ipc_message.h
+++ b/chrome/common/ipc_message.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_MESSAGE_H__
-#define IPC_IPC_MESSAGE_H__
+#ifndef CHROME_COMMON_IPC_MESSAGE_H__
+#define CHROME_COMMON_IPC_MESSAGE_H__
#include <string>
@@ -276,4 +276,4 @@ enum SpecialRoutingIDs {
#define IPC_REPLY_ID 0xFFF0 // Special message id for replies
#define IPC_LOGGING_ID 0xFFF1 // Special message id for logging
-#endif // IPC_IPC_MESSAGE_H__
+#endif // CHROME_COMMON_IPC_MESSAGE_H__
diff --git a/ipc/ipc_message_macros.h b/chrome/common/ipc_message_macros.h
index 8bddb7f..7cba911 100644
--- a/ipc/ipc_message_macros.h
+++ b/chrome/common/ipc_message_macros.h
@@ -40,12 +40,24 @@
// ViewHostMsg_SyncMessageName::WriteReplyParams(reply_msg, out1, out2);
// Send(reply_msg);
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
+
#ifndef MESSAGES_INTERNAL_FILE
#error This file should only be included by X_messages.h, which needs to define MESSAGES_INTERNAL_FILE first.
#endif
+// Trick scons and xcode into seeing the possible real dependencies since they
+// don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828
+#if 0
+#include "chrome/common/ipc_sync_message_unittest.h"
+#include "chrome/common/plugin_messages_internal.h"
+#include "chrome/common/render_messages_internal.h"
+#include "chrome/renderer/devtools_messages_internal.h"
+#include "chrome/test/automation/automation_messages_internal.h"
+#include "chrome/common/worker_messages_internal.h"
+#endif
+
#ifndef IPC_MESSAGE_MACROS_INCLUDE_BLOCK
#define IPC_MESSAGE_MACROS_INCLUDE_BLOCK
diff --git a/chrome/common/gurl_serialisation_unittest.cc b/chrome/common/ipc_message_unittest.cc
index 9fdd59d..643626e 100644
--- a/chrome/common/gurl_serialisation_unittest.cc
+++ b/chrome/common/ipc_message_unittest.cc
@@ -4,13 +4,13 @@
#include <string.h>
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_message_utils.h"
#include "googleurl/src/gurl.h"
-#include "chrome/common/common_message_utils.h"
-#include "ipc/ipc_message.h"
#include "testing/gtest/include/gtest/gtest.h"
// Tests that serialize/deserialize correctly understand each other
-TEST(GURLSerialisation, Serialize) {
+TEST(IPCMessageTest, Serialize) {
const char* serialize_cases[] = {
"http://www.google.com/",
"http://user:pass@host.com:888/foo;bar?baz#nop",
diff --git a/chrome/common/common_message_utils.cc b/chrome/common/ipc_message_utils.cc
index e12edae..36e8052 100644
--- a/chrome/common/common_message_utils.cc
+++ b/chrome/common/ipc_message_utils.cc
@@ -1,9 +1,10 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 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/common_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
+#include "base/gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "SkBitmap.h"
#include "webkit/glue/dom_operations.h"
@@ -44,6 +45,7 @@ struct SkBitmap_Data {
} // namespace
+
void ParamTraits<SkBitmap>::Write(Message* m, const SkBitmap& p) {
size_t fixed_size = sizeof(SkBitmap_Data);
SkBitmap_Data bmp_data;
@@ -84,6 +86,7 @@ void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::wstring* l) {
l->append(StringPrintf(L"<SkBitmap>"));
}
+
void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
m->WriteString(p.possibly_invalid_spec());
// TODO(brettw) bug 684583: Add encoding for query params.
@@ -103,6 +106,74 @@ void ParamTraits<GURL>::Log(const GURL& p, std::wstring* l) {
l->append(UTF8ToWide(p.spec()));
}
+
+void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
+ m->WriteInt(p.x());
+ m->WriteInt(p.y());
+}
+
+bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter,
+ gfx::Point* r) {
+ int x, y;
+ if (!m->ReadInt(iter, &x) ||
+ !m->ReadInt(iter, &y))
+ return false;
+ r->set_x(x);
+ r->set_y(y);
+ return true;
+}
+
+void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::wstring* l) {
+ l->append(StringPrintf(L"(%d, %d)", p.x(), p.y()));
+}
+
+
+void ParamTraits<gfx::Rect>::Write(Message* m, const gfx::Rect& p) {
+ m->WriteInt(p.x());
+ m->WriteInt(p.y());
+ m->WriteInt(p.width());
+ m->WriteInt(p.height());
+}
+
+bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
+ int x, y, w, h;
+ if (!m->ReadInt(iter, &x) ||
+ !m->ReadInt(iter, &y) ||
+ !m->ReadInt(iter, &w) ||
+ !m->ReadInt(iter, &h))
+ return false;
+ r->set_x(x);
+ r->set_y(y);
+ r->set_width(w);
+ r->set_height(h);
+ return true;
+}
+
+void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::wstring* l) {
+ l->append(StringPrintf(L"(%d, %d, %d, %d)", p.x(), p.y(),
+ p.width(), p.height()));
+}
+
+
+void ParamTraits<gfx::Size>::Write(Message* m, const gfx::Size& p) {
+ m->WriteInt(p.width());
+ m->WriteInt(p.height());
+}
+
+bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
+ int w, h;
+ if (!m->ReadInt(iter, &w) ||
+ !m->ReadInt(iter, &h))
+ return false;
+ r->set_width(w);
+ r->set_height(h);
+ return true;
+}
+
+void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::wstring* l) {
+ l->append(StringPrintf(L"(%d, %d)", p.width(), p.height()));
+}
+
void ParamTraits<webkit_glue::WebApplicationInfo>::Write(
Message* m, const webkit_glue::WebApplicationInfo& p) {
WriteParam(m, p.title);
diff --git a/ipc/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 582b491..6e82d40 100644
--- a/ipc/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IPC_IPC_MESSAGE_UTILS_H_
-#define IPC_IPC_MESSAGE_UTILS_H_
+#ifndef CHROME_COMMON_IPC_MESSAGE_UTILS_H_
+#define CHROME_COMMON_IPC_MESSAGE_UTILS_H_
#include <string>
#include <vector>
@@ -12,20 +12,30 @@
#include "base/file_path.h"
#include "base/string_util.h"
#include "base/string16.h"
-#include "base/time.h"
#include "base/tuple.h"
#if defined(OS_POSIX)
-#include "ipc/file_descriptor_set_posix.h"
+#include "chrome/common/file_descriptor_set_posix.h"
#endif
-#include "ipc/ipc_sync_message.h"
+#include "chrome/common/ipc_sync_message.h"
+#include "chrome/common/thumbnail_score.h"
+#include "chrome/common/transport_dib.h"
+#include "webkit/glue/webcursor.h"
+#include "webkit/glue/window_open_disposition.h"
// Forward declarations.
+class GURL;
+class SkBitmap;
+
namespace gfx {
class Point;
class Rect;
class Size;
} // namespace gfx
+namespace webkit_glue {
+struct WebApplicationInfo;
+} // namespace webkit_glue
+
// Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique
// base. Messages have unique IDs across channels in order for the IPC logging
// code to figure out the message class from its ID.
@@ -336,6 +346,18 @@ struct ParamTraits<MSG> {
#endif // defined(OS_WIN)
template <>
+struct ParamTraits<SkBitmap> {
+ typedef SkBitmap param_type;
+ static void Write(Message* m, const param_type& p);
+
+ // Note: This function expects parameter |r| to be of type &SkBitmap since
+ // r->SetConfig() and r->SetPixels() are called.
+ static bool Read(const Message* m, void** iter, param_type* r);
+
+ static void Log(const param_type& p, std::wstring* l);
+};
+
+template <>
struct ParamTraits<std::string> {
typedef std::string param_type;
static void Write(Message* m, const param_type& p) {
@@ -504,6 +526,14 @@ struct ParamTraits<string16> {
};
#endif
+template <>
+struct ParamTraits<GURL> {
+ typedef GURL param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* p);
+ static void Log(const param_type& p, std::wstring* l);
+};
+
// and, a few more useful types...
#if defined(OS_WIN)
template <>
@@ -710,6 +740,54 @@ struct ParamTraits<base::FileDescriptor> {
};
#endif // defined(OS_POSIX)
+template<>
+struct ParamTraits<ThumbnailScore> {
+ typedef ThumbnailScore param_type;
+ static void Write(Message* m, const param_type& p) {
+ IPC::ParamTraits<double>::Write(m, p.boring_score);
+ IPC::ParamTraits<bool>::Write(m, p.good_clipping);
+ IPC::ParamTraits<bool>::Write(m, p.at_top);
+ IPC::ParamTraits<base::Time>::Write(m, p.time_at_snapshot);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ double boring_score;
+ bool good_clipping, at_top;
+ base::Time time_at_snapshot;
+ if (!IPC::ParamTraits<double>::Read(m, iter, &boring_score) ||
+ !IPC::ParamTraits<bool>::Read(m, iter, &good_clipping) ||
+ !IPC::ParamTraits<bool>::Read(m, iter, &at_top) ||
+ !IPC::ParamTraits<base::Time>::Read(m, iter, &time_at_snapshot))
+ return false;
+
+ r->boring_score = boring_score;
+ r->good_clipping = good_clipping;
+ r->at_top = at_top;
+ r->time_at_snapshot = time_at_snapshot;
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"(%f, %d, %d)",
+ p.boring_score, p.good_clipping, p.at_top));
+ }
+};
+
+template <>
+struct ParamTraits<WindowOpenDisposition> {
+ typedef WindowOpenDisposition param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int temp;
+ bool res = m->ReadInt(iter, &temp);
+ *r = static_cast<WindowOpenDisposition>(temp);
+ return res;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%d", p));
+ }
+};
+
#if defined(OS_WIN)
template <>
struct ParamTraits<XFORM> {
@@ -736,6 +814,20 @@ struct ParamTraits<XFORM> {
};
#endif // defined(OS_WIN)
+template <>
+struct ParamTraits<WebCursor> {
+ typedef WebCursor param_type;
+ static void Write(Message* m, const param_type& p) {
+ p.Serialize(m);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return r->Deserialize(m, iter);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebCursor>");
+ }
+};
+
struct LogData {
std::wstring channel;
uint16 type;
@@ -781,6 +873,37 @@ struct ParamTraits<LogData> {
template <>
+struct ParamTraits<webkit_glue::WebApplicationInfo> {
+ typedef webkit_glue::WebApplicationInfo param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* r);
+ static void Log(const param_type& p, std::wstring* l);
+};
+
+
+#if defined(OS_WIN)
+template<>
+struct ParamTraits<TransportDIB::Id> {
+ typedef TransportDIB::Id param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.handle);
+ WriteParam(m, p.sequence_num);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return (ReadParam(m, iter, &r->handle) &&
+ ReadParam(m, iter, &r->sequence_num));
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"TransportDIB(");
+ LogParam(p.handle, l);
+ l->append(L", ");
+ LogParam(p.sequence_num, l);
+ l->append(L")");
+ }
+};
+#endif
+
+template <>
struct ParamTraits<Message> {
static void Write(Message* m, const Message& p) {
m->WriteInt(p.size());
@@ -1255,4 +1378,4 @@ class MessageWithReply : public SyncMessage {
} // namespace IPC
-#endif // IPC_IPC_MESSAGE_UTILS_H_
+#endif // CHROME_COMMON_IPC_MESSAGE_UTILS_H_
diff --git a/ipc/ipc_send_fds_test.cc b/chrome/common/ipc_send_fds_test.cc
index ff32afc..747892d 100644
--- a/ipc/ipc_send_fds_test.cc
+++ b/chrome/common/ipc_send_fds_test.cc
@@ -4,7 +4,7 @@
#include "build/build_config.h"
-#include "ipc/ipc_tests.h"
+#include "chrome/common/ipc_tests.h"
#if defined(OS_MACOSX)
extern "C" {
@@ -15,8 +15,8 @@ extern "C" {
#include <sys/stat.h>
#include "base/message_loop.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_channel.h"
+#include "chrome/common/ipc_message_utils.h"
#if defined(OS_POSIX)
diff --git a/ipc/ipc_sync_channel.cc b/chrome/common/ipc_sync_channel.cc
index 137d9fa..842678c 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/chrome/common/ipc_sync_channel.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_sync_channel.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
@@ -10,7 +10,7 @@
#include "base/message_loop.h"
#include "base/waitable_event.h"
#include "base/waitable_event_watcher.h"
-#include "ipc/ipc_sync_message.h"
+#include "chrome/common/ipc_sync_message.h"
using base::TimeDelta;
using base::TimeTicks;
diff --git a/ipc/ipc_sync_channel.h b/chrome/common/ipc_sync_channel.h
index d802d91..1b192f6 100644
--- a/ipc/ipc_sync_channel.h
+++ b/chrome/common/ipc_sync_channel.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMMON_IPC_SYNC_SENDER_H__
-#define COMMON_IPC_SYNC_SENDER_H__
+#ifndef CHROME_COMMON_IPC_SYNC_SENDER_H__
+#define CHROME_COMMON_IPC_SYNC_SENDER_H__
#include <string>
#include <deque>
@@ -13,7 +13,7 @@
#include "base/scoped_handle.h"
#include "base/waitable_event.h"
#include "base/waitable_event_watcher.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "chrome/common/ipc_channel_proxy.h"
namespace IPC {
@@ -156,4 +156,4 @@ class SyncChannel : public ChannelProxy,
} // namespace IPC
-#endif // COMMON_IPC_SYNC_SENDER_H__
+#endif // CHROME_COMMON_IPC_SYNC_SENDER_H__
diff --git a/ipc/ipc_sync_channel_unittest.cc b/chrome/common/ipc_sync_channel_unittest.cc
index 056a084..6e00fca 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/chrome/common/ipc_sync_channel_unittest.cc
@@ -14,17 +14,14 @@
#include "base/string_util.h"
#include "base/thread.h"
#include "base/waitable_event.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_sync_channel.h"
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_sync_channel.h"
+#include "chrome/common/stl_util-inl.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "ipc/ipc_sync_message_unittest.h"
-#endif
-#define MESSAGES_INTERNAL_FILE "ipc/ipc_sync_message_unittest.h"
-#include "ipc/ipc_message_macros.h"
+
+#define MESSAGES_INTERNAL_FILE "chrome/common/ipc_sync_message_unittest.h"
+#include "chrome/common/ipc_message_macros.h"
using namespace IPC;
using base::WaitableEvent;
@@ -227,8 +224,7 @@ void RunTest(std::vector<Worker*> workers) {
for (size_t i = 0; i < workers.size(); ++i)
workers[i]->done_event()->Wait();
- for (size_t i = 0; i < workers.size(); ++i)
- delete workers[i];
+ STLDeleteContainerPointers(workers.begin(), workers.end());
}
} // namespace
diff --git a/ipc/ipc_sync_message.cc b/chrome/common/ipc_sync_message.cc
index 519adb1..a7407e4 100644
--- a/ipc/ipc_sync_message.cc
+++ b/chrome/common/ipc_sync_message.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/waitable_event.h"
-#include "ipc/ipc_sync_message.h"
+#include "chrome/common/ipc_sync_message.h"
namespace IPC {
diff --git a/ipc/ipc_sync_message.h b/chrome/common/ipc_sync_message.h
index 3006736..b03007e 100644
--- a/ipc/ipc_sync_message.h
+++ b/chrome/common/ipc_sync_message.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMMON_IPC_SYNC_MESSAGE_H__
-#define COMMON_IPC_SYNC_MESSAGE_H__
+#ifndef CHROME_COMMON_IPC_SYNC_MESSAGE_H__
+#define CHROME_COMMON_IPC_SYNC_MESSAGE_H__
#if defined(OS_WIN)
#include <windows.h>
#endif
#include <string>
#include "base/basictypes.h"
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
namespace base {
class WaitableEvent;
@@ -93,4 +93,4 @@ class MessageReplyDeserializer {
} // namespace IPC
-#endif // COMMON_IPC_SYNC_MESSAGE_H__
+#endif // CHROME_COMMON_IPC_SYNC_MESSAGE_H__
diff --git a/ipc/ipc_sync_message_unittest.cc b/chrome/common/ipc_sync_message_unittest.cc
index 9e3de1f..b4f86a2 100644
--- a/ipc/ipc_sync_message_unittest.cc
+++ b/chrome/common/ipc_sync_message_unittest.cc
@@ -9,18 +9,14 @@
#include <string.h>
#include "base/basictypes.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_message_utils.h"
#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "ipc/ipc_sync_message_unittest.h"
-#endif
-#define MESSAGES_INTERNAL_FILE "ipc/ipc_sync_message_unittest.h"
-#include "ipc/ipc_message_macros.h"
+
+#define MESSAGES_INTERNAL_FILE "chrome/common/ipc_sync_message_unittest.h"
+#include "chrome/common/ipc_message_macros.h"
static IPC::Message* g_reply;
diff --git a/ipc/ipc_sync_message_unittest.h b/chrome/common/ipc_sync_message_unittest.h
index 7b252b5..4ac9099 100644
--- a/ipc/ipc_sync_message_unittest.h
+++ b/chrome/common/ipc_sync_message_unittest.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
IPC_BEGIN_MESSAGES(Test)
IPC_SYNC_MESSAGE_CONTROL0_0(SyncChannelTestMsg_NoArgs)
diff --git a/ipc/ipc_test_sink.cc b/chrome/common/ipc_test_sink.cc
index 1f1ce3f..c278902 100644
--- a/ipc/ipc_test_sink.cc
+++ b/chrome/common/ipc_test_sink.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/ipc_test_sink.h"
+#include "chrome/common/ipc_test_sink.h"
namespace IPC {
diff --git a/ipc/ipc_test_sink.h b/chrome/common/ipc_test_sink.h
index 851ed8e..fd9faee 100644
--- a/ipc/ipc_test_sink.h
+++ b/chrome/common/ipc_test_sink.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMMON_IPC_TEST_SINK_H_
-#define COMMON_IPC_TEST_SINK_H_
+#ifndef CHROME_COMMON_IPC_TEST_SINK_H_
+#define CHROME_COMMON_IPC_TEST_SINK_H_
#include <utility>
#include <vector>
#include "base/basictypes.h"
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
namespace IPC {
@@ -81,4 +81,4 @@ class TestSink {
} // namespace IPC
-#endif // COMMON_IPC_TEST_SINK_H_
+#endif // CHROME_COMMON_IPC_TEST_SINK_H_
diff --git a/ipc/ipc_tests.cc b/chrome/common/ipc_tests.cc
index 506b888..ae88659 100644
--- a/ipc/ipc_tests.cc
+++ b/chrome/common/ipc_tests.cc
@@ -15,7 +15,7 @@
#include <iostream>
#include <string>
-#include "ipc/ipc_tests.h"
+#include "chrome/common/ipc_tests.h"
#include "base/at_exit.h"
#include "base/base_switches.h"
@@ -25,9 +25,10 @@
#include "base/perf_test_suite.h"
#include "base/test_suite.h"
#include "base/thread.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_channel_proxy.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/ipc_channel.h"
+#include "chrome/common/ipc_channel_proxy.h"
+#include "chrome/common/ipc_message_utils.h"
#include "testing/multiprocess_func_list.h"
// Define to enable IPC performance testing instead of the regular unit tests
diff --git a/ipc/ipc_tests.h b/chrome/common/ipc_tests.h
index 5005eb3..3cefafe 100644
--- a/ipc/ipc_tests.h
+++ b/chrome/common/ipc_tests.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMMON_IPC_TESTS_H__
-#define COMMON_IPC_TESTS_H__
+#ifndef CHROME_COMMON_IPC_TESTS_H__
+#define CHROME_COMMON_IPC_TESTS_H__
#include "base/multiprocess_test.h"
#include "base/process.h"
@@ -44,4 +44,4 @@ class IPCChannelTest : public MultiProcessTest {
MessageLoopForIO *message_loop_;
};
-#endif // COMMON_IPC_TESTS_H__
+#endif // CHROME_COMMON_IPC_TESTS_H__
diff --git a/chrome/common/ipc_tests.vcproj b/chrome/common/ipc_tests.vcproj
new file mode 100644
index 0000000..78fae65
--- /dev/null
+++ b/chrome/common/ipc_tests.vcproj
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="ipc_tests"
+ ProjectGUID="{B92AE829-E1CD-4781-824A-DCB1603A1672}"
+ RootNamespace="ipc_tests"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="shlwapi.lib rpcrt4.lib winmm.lib"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops;$(SolutionDir)..\skia\using_skia.vsprops;$(SolutionDir)..\testing\using_gtest.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="shlwapi.lib rpcrt4.lib winmm.lib"
+ SubSystem="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\ipc_fuzzing_tests.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_tests.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\ipc_tests.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\base\perftimer.cc"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index a68b4d6..66a49cf 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -25,23 +25,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
-#if defined(OS_POSIX)
-// On POSIX, this file also handles IPC logging
-
-#include "ipc/ipc_logging.h"
-#include "ipc/ipc_message.h"
-
-#ifdef IPC_MESSAGE_LOG_ENABLED
-// This will cause render_messages.h etc to define ViewMsgLog and friends.
-#define IPC_MESSAGE_MACROS_LOG_ENABLED
-// This include list should contain all _messages.h header files so that they
-// can get *MsgLog function etc. This makes ipc logs much more informative.
-#include "chrome/common/render_messages.h"
-#include "chrome/test/automation/automation_messages.h"
-#endif
-
-#endif
-
// When true, this means that error dialogs should not be shown.
static bool dialogs_are_suppressed_ = false;
@@ -89,10 +72,6 @@ void InitChromeLogging(const CommandLine& command_line,
DCHECK(!chrome_logging_initialized_) <<
"Attempted to initialize logging when it was already initialized.";
-#if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED)
- IPC::Logging::SetLoggerFunctions(g_log_function_mapping);
-#endif
-
// only use OutputDebugString in debug mode
#ifdef NDEBUG
bool enable_logging = false;
diff --git a/chrome/common/message_router.h b/chrome/common/message_router.h
index ef18aaa..d23e2f3 100644
--- a/chrome/common/message_router.h
+++ b/chrome/common/message_router.h
@@ -6,7 +6,7 @@
#define CHROME_COMMON_MESSAGE_ROUTER_H__
#include "base/id_map.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
// The MessageRouter handles all incoming messages sent to it by routing them
// to the correct listener. Routing is based on the Message's routing ID.
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h
index ecd012a..7b5ce73 100644
--- a/chrome/common/plugin_messages.h
+++ b/chrome/common/plugin_messages.h
@@ -16,8 +16,7 @@
#include "base/gfx/native_widget_types.h"
#include "base/gfx/rect.h"
#include "base/basictypes.h"
-#include "chrome/common/common_message_utils.h"
-#include "ipc/ipc_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
#include "googleurl/src/gurl.h"
#include "third_party/npapi/bindings/npapi.h"
#include "webkit/glue/npruntime_util.h"
@@ -448,12 +447,8 @@ struct ParamTraits<NPVariant_Param> {
} // namespace IPC
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "chrome/common/plugin_messages_internal.h"
-#endif
+
#define MESSAGES_INTERNAL_FILE "chrome/common/plugin_messages_internal.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#endif // CHROME_COMMON_PLUGIN_MESSAGES_H__
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index cafc4b0..11a0365 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/shared_memory.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#include "webkit/glue/webcursor.h"
//-----------------------------------------------------------------------------
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index b2e289f..38af203 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -15,13 +15,12 @@
#include "base/shared_memory.h"
#include "chrome/browser/renderer_host/resource_handler.h"
#include "chrome/common/filter_policy.h"
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/page_transition_types.h"
#include "chrome/common/transport_dib.h"
#include "chrome/common/webkit_param_traits.h"
#include "googleurl/src/gurl.h"
-#include "ipc/ipc_message_utils.h"
#include "media/audio/audio_output.h"
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
@@ -1772,12 +1771,7 @@ struct ParamTraits<AudioOutputStream::State> {
} // namespace IPC
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "chrome/common/render_messages_internal.h"
-#endif
#define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#endif // CHROME_COMMON_RENDER_MESSAGES_H_
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 8a81d74..ece0cd1 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -15,8 +15,8 @@
#include "base/gfx/rect.h"
#include "base/gfx/native_widget_types.h"
#include "base/shared_memory.h"
+#include "chrome/common/ipc_message_macros.h"
#include "chrome/common/transport_dib.h"
-#include "ipc/ipc_message_macros.h"
#include "skia/include/SkBitmap.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/webcursor.h"
diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h
index f494aff..73d0a8b3 100644
--- a/chrome/common/resource_dispatcher.h
+++ b/chrome/common/resource_dispatcher.h
@@ -15,7 +15,7 @@
#include "base/shared_memory.h"
#include "base/task.h"
#include "chrome/common/filter_policy.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include "webkit/glue/resource_loader_bridge.h"
struct ResourceResponseHead;
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h
index 0f48ef3..d41bccc 100644
--- a/chrome/common/webkit_param_traits.h
+++ b/chrome/common/webkit_param_traits.h
@@ -8,7 +8,7 @@
#ifndef CHROME_COMMON_WEBKIT_PARAM_TRAITS_H_
#define CHROME_COMMON_WEBKIT_PARAM_TRAITS_H_
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindInPageRequest.h"
diff --git a/chrome/common/worker_messages.h b/chrome/common/worker_messages.h
index 50bc69b..c1fde97 100644
--- a/chrome/common/worker_messages.h
+++ b/chrome/common/worker_messages.h
@@ -11,15 +11,10 @@
#include <string>
#include "base/basictypes.h"
-#include "ipc/ipc_message_utils.h"
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
+
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "chrome/common/worker_messages_internal.h"
-#endif
#define MESSAGES_INTERNAL_FILE "chrome/common/worker_messages_internal.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#endif // CHROME_COMMON_WORKER_MESSAGES_H_
diff --git a/chrome/common/worker_messages_internal.h b/chrome/common/worker_messages_internal.h
index ba9bb4c..7691c79 100644
--- a/chrome/common/worker_messages_internal.h
+++ b/chrome/common/worker_messages_internal.h
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/string16.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/plugin/npobject_proxy.h b/chrome/plugin/npobject_proxy.h
index 14892f8a..bb0ec2c 100644
--- a/chrome/plugin/npobject_proxy.h
+++ b/chrome/plugin/npobject_proxy.h
@@ -9,7 +9,7 @@
#define CHROME_PLUGIN_NPOBJECT_PROXY_H_
#include "base/ref_counted.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include "third_party/npapi/bindings/npruntime.h"
class PluginChannelBase;
diff --git a/chrome/plugin/npobject_stub.h b/chrome/plugin/npobject_stub.h
index 98be7da..cd75853 100644
--- a/chrome/plugin/npobject_stub.h
+++ b/chrome/plugin/npobject_stub.h
@@ -11,7 +11,7 @@
#include <vector>
#include "base/ref_counted.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
namespace base {
class WaitableEvent;
diff --git a/chrome/plugin/plugin_channel_base.cc b/chrome/plugin/plugin_channel_base.cc
index 066610a..0e26e86 100644
--- a/chrome/plugin/plugin_channel_base.cc
+++ b/chrome/plugin/plugin_channel_base.cc
@@ -8,7 +8,7 @@
#include "base/hash_tables.h"
#include "chrome/common/child_process.h"
-#include "ipc/ipc_sync_message.h"
+#include "chrome/common/ipc_sync_message.h"
typedef base::hash_map<std::wstring, scoped_refptr<PluginChannelBase> >
PluginChannelMap;
diff --git a/chrome/plugin/plugin_channel_base.h b/chrome/plugin/plugin_channel_base.h
index e36db71..dd70cba 100644
--- a/chrome/plugin/plugin_channel_base.h
+++ b/chrome/plugin/plugin_channel_base.h
@@ -12,7 +12,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "ipc/ipc_sync_channel.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/message_router.h"
// Encapsulates an IPC channel between a renderer and a plugin process.
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index b121b14..995d318 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -11,7 +11,7 @@
#include "base/ref_counted.h"
#include "base/shared_memory.h"
#include "base/task.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include "third_party/npapi/bindings/npapi.h"
class GURL;
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index 1d5f72e..8c4629d 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -11,8 +11,8 @@
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
#include "base/timer.h"
+#include "chrome/common/ipc_message.h"
#include "chrome/common/chrome_plugin_api.h"
-#include "ipc/ipc_message.h"
#include "webkit/glue/webplugin.h"
namespace base {
diff --git a/chrome/renderer/automation/dom_automation_controller.h b/chrome/renderer/automation/dom_automation_controller.h
index e886165..33e6111 100644
--- a/chrome/renderer/automation/dom_automation_controller.h
+++ b/chrome/renderer/automation/dom_automation_controller.h
@@ -5,7 +5,7 @@
#ifndef CHROME_RENDERER_AUTOMATION_DOM_AUTOMATION_CONTROLLER_H__
#define CHROME_RENDERER_AUTOMATION_DOM_AUTOMATION_CONTROLLER_H__
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "webkit/glue/cpp_bound_class.h"
/* DomAutomationController class:
diff --git a/chrome/renderer/debug_message_handler.h b/chrome/renderer/debug_message_handler.h
index cc35227..76abd60 100644
--- a/chrome/renderer/debug_message_handler.h
+++ b/chrome/renderer/debug_message_handler.h
@@ -9,7 +9,7 @@
#ifndef CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_
#define CHROME_RENDERER_DEBUG_MESSAGE_HANDLER_H_
-#include "ipc/ipc_channel_proxy.h"
+#include "chrome/common/ipc_channel_proxy.h"
#include "webkit/glue/debugger_bridge.h"
class RenderView;
diff --git a/chrome/renderer/devtools_agent.h b/chrome/renderer/devtools_agent.h
index e1938c2..9059542 100644
--- a/chrome/renderer/devtools_agent.h
+++ b/chrome/renderer/devtools_agent.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
+#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/renderer/devtools_messages.h"
-#include "ipc/ipc_channel_proxy.h"
#include "webkit/glue/webdevtoolsagent_delegate.h"
class MessageLoop;
diff --git a/chrome/renderer/devtools_messages.h b/chrome/renderer/devtools_messages.h
index 26afac6..709d51f 100644
--- a/chrome/renderer/devtools_messages.h
+++ b/chrome/renderer/devtools_messages.h
@@ -5,12 +5,7 @@
#ifndef CHROME_RENDERER_DEVTOOLS_MESSAGES_H_
#define CHROME_RENDERER_DEVTOOLS_MESSAGES_H_
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "chrome/renderer/devtools_messages_internal.h"
-#endif
#define MESSAGES_INTERNAL_FILE "chrome/renderer/devtools_messages_internal.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#endif // CHROME_RENDERER_DEVTOOLS_MESSAGES_H_
diff --git a/chrome/renderer/devtools_messages_internal.h b/chrome/renderer/devtools_messages_internal.h
index e3fa28e..b0e0a8a 100644
--- a/chrome/renderer/devtools_messages_internal.h
+++ b/chrome/renderer/devtools_messages_internal.h
@@ -42,7 +42,7 @@
//
// This file describes developer tools message types.
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
// These are messages sent from DevToolsAgent to DevToolsClient through the
// browser.
diff --git a/chrome/renderer/dom_ui_bindings.h b/chrome/renderer/dom_ui_bindings.h
index b4ad992..23b2d35 100644
--- a/chrome/renderer/dom_ui_bindings.h
+++ b/chrome/renderer/dom_ui_bindings.h
@@ -5,7 +5,7 @@
#ifndef CHROME_RENDERER_DOM_UI_BINDINGS_H__
#define CHROME_RENDERER_DOM_UI_BINDINGS_H__
-#include "ipc/ipc_message.h"
+#include "chrome/common/ipc_message.h"
#include "webkit/glue/cpp_bound_class.h"
// A DOMBoundBrowserObject is a backing for some object bound to the window
diff --git a/chrome/renderer/external_host_bindings.h b/chrome/renderer/external_host_bindings.h
index d995975..cd8bcdb 100644
--- a/chrome/renderer/external_host_bindings.h
+++ b/chrome/renderer/external_host_bindings.h
@@ -5,8 +5,8 @@
#ifndef CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_
#define CHROME_RENDERER_EXTERNAL_HOST_BINDINGS_H_
+#include "chrome/common/ipc_message.h"
#include "chrome/renderer/dom_ui_bindings.h"
-#include "ipc/ipc_message.h"
// ExternalHostBindings is the class backing the "externalHost" object
// accessible from Javascript
diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc
index 0a7618e..19fdd48 100644
--- a/chrome/renderer/mock_render_thread.cc
+++ b/chrome/renderer/mock_render_thread.cc
@@ -4,8 +4,8 @@
#include "chrome/renderer/mock_render_thread.h"
+#include "chrome/common/ipc_message_utils.h"
#include "chrome/common/render_messages.h"
-#include "ipc/ipc_message_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
MockRenderThread::MockRenderThread()
diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h
index 65543eb..a89822a6 100644
--- a/chrome/renderer/mock_render_thread.h
+++ b/chrome/renderer/mock_render_thread.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "ipc/ipc_test_sink.h"
+#include "chrome/common/ipc_test_sink.h"
#include "chrome/renderer/render_thread.h"
// This class is very simple mock of RenderThread. It simulates an IPC channel
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index dca03c7..e8af233 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -23,11 +23,11 @@
#include "chrome/browser/net/dns_global.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/ipc_channel.h"
+#include "chrome/common/ipc_message_utils.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/transport_dib.h"
#include "chrome/renderer/render_view.h"
-#include "ipc/ipc_channel.h"
-#include "ipc/ipc_message_utils.h"
#include "webkit/glue/webkit_glue.h"
// Attempts to load FFmpeg before engaging the sandbox. Returns true if all
diff --git a/chrome/renderer/render_thread_unittest.cc b/chrome/renderer/render_thread_unittest.cc
index c03f889..808bedf 100644
--- a/chrome/renderer/render_thread_unittest.cc
+++ b/chrome/renderer/render_thread_unittest.cc
@@ -3,10 +3,10 @@
// found in the LICENSE file.
#include "base/waitable_event.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/common/render_messages.h"
#include "chrome/renderer/mock_render_process.h"
#include "chrome/renderer/render_thread.h"
-#include "ipc/ipc_sync_channel.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 3e58790..7ee2c04 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -13,8 +13,8 @@
#include "base/gfx/size.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
+#include "chrome/common/ipc_channel.h"
#include "chrome/renderer/render_process.h"
-#include "ipc/ipc_channel.h"
#include "skia/ext/platform_canvas.h"
#include "webkit/glue/webwidget_delegate.h"
diff --git a/chrome/renderer/renderer_main_unittest.cc b/chrome/renderer/renderer_main_unittest.cc
index 6bb21bd..c938f5b 100644
--- a/chrome/renderer/renderer_main_unittest.cc
+++ b/chrome/renderer/renderer_main_unittest.cc
@@ -6,8 +6,8 @@
#include "base/multiprocess_test.h"
#include "base/process_util.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/ipc_channel.h"
#include "chrome/common/main_function_params.h"
-#include "ipc/ipc_channel.h"
#include "testing/gtest/include/gtest/gtest.h"
// TODO(port): Bring up this test this on other platforms.
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 2c20a4f..8af9733 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -10,8 +10,8 @@
#include "base/gfx/rect.h"
#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
+#include "chrome/common/ipc_message.h"
#include "chrome/renderer/plugin_channel_host.h"
-#include "ipc/ipc_message.h"
#include "webkit/glue/webplugin.h"
#include "webkit/glue/webplugin_delegate.h"
diff --git a/chrome/renderer/webworker_proxy.h b/chrome/renderer/webworker_proxy.h
index c18d3bd..94c199d 100644
--- a/chrome/renderer/webworker_proxy.h
+++ b/chrome/renderer/webworker_proxy.h
@@ -8,7 +8,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include "webkit/glue/webworker.h"
class GURL;
diff --git a/chrome/test/automation/autocomplete_edit_proxy.h b/chrome/test/automation/autocomplete_edit_proxy.h
index b14cb6a..79d8975 100644
--- a/chrome/test/automation/autocomplete_edit_proxy.h
+++ b/chrome/test/automation/autocomplete_edit_proxy.h
@@ -9,10 +9,9 @@
#include <vector>
#include "chrome/browser/autocomplete/autocomplete.h"
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_message_utils.h"
#include "chrome/test/automation/automation_handle_tracker.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_utils.h"
#include "googleurl/src/gurl.h"
// The purpose of this class is to act as a serializable version of
diff --git a/chrome/test/automation/automation_messages.h b/chrome/test/automation/automation_messages.h
index 9b24acc..5968f78 100644
--- a/chrome/test/automation/automation_messages.h
+++ b/chrome/test/automation/automation_messages.h
@@ -10,9 +10,8 @@
#include "base/basictypes.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/security_style.h"
-#include "chrome/common/common_message_utils.h"
+#include "chrome/common/ipc_message_utils.h"
#include "chrome/test/automation/automation_constants.h"
-#include "ipc/ipc_message_utils.h"
struct AutomationMsg_Find_Params {
// Unused value, which exists only for backwards compat.
@@ -216,13 +215,8 @@ struct ParamTraits<Reposition_Params> {
} // namespace IPC
-#if 0
-// This for tools which parse #include lines, but cannot process when we
-// include via a macro name.
-#include "chrome/test/automation/automation_messages_internal.h"
-#endif
#define MESSAGES_INTERNAL_FILE \
"chrome/test/automation/automation_messages_internal.h"
-#include "ipc/ipc_message_macros.h"
+#include "chrome/common/ipc_message_macros.h"
#endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index cc7d644..59599b1 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -14,9 +14,9 @@
#include "base/basictypes.h"
#include "base/gfx/rect.h"
#include "base/string16.h"
+#include "chrome/common/ipc_message_macros.h"
#include "chrome/common/navigation_types.h"
#include "chrome/test/automation/autocomplete_edit_proxy.h"
-#include "ipc/ipc_message_macros.h"
#include "googleurl/src/gurl.h"
// NOTE: All IPC messages have either a routing_id of 0 (for asynchronous
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index f31205d..138edd0 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -13,11 +13,11 @@
#include "base/time.h"
#include "base/thread.h"
#include "base/waitable_event.h"
+#include "chrome/common/ipc_channel_proxy.h"
+#include "chrome/common/ipc_message.h"
+#include "chrome/common/ipc_sync_channel.h"
#include "chrome/test/automation/automation_handle_tracker.h"
#include "chrome/test/automation/automation_messages.h"
-#include "ipc/ipc_channel_proxy.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_sync_channel.h"
#if defined(OS_WIN)
// TODO(port): Enable this or equivalent.
diff --git a/chrome/test/data/purify/ipc_tests.exe_UMR.txt b/chrome/test/data/purify/ipc_tests.exe_UMR.txt
index 16ee86e..6f7d34f 100644
--- a/chrome/test/data/purify/ipc_tests.exe_UMR.txt
+++ b/chrome/test/data/purify/ipc_tests.exe_UMR.txt
@@ -1,34 +1,34 @@
Uninitialized memory read in strlen
Error Location
...
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::ProcessNextObject(void)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in WriteFile
Error Location
...
- ipc/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
- ipc/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::ProcessNextObject(void)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Alloc Location
...
@@ -36,47 +36,47 @@ Alloc Location
base/pickle.cc Pickle::BeginWrite(UINT)
base/pickle.cc Pickle::WriteBytes(void const*,int)
base/pickle.cc Pickle::WriteString(basic_string::std const&)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::ProcessNextObject(void)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in strlen
Error Location
...
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in WriteFile
Error Location
...
- ipc/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
- ipc/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Alloc Location
...
@@ -84,31 +84,31 @@ Alloc Location
base/pickle.cc Pickle::BeginWrite(UINT)
base/pickle.cc Pickle::WriteBytes(void const*,int)
base/pickle.cc Pickle::WriteString(basic_string::std const&)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in WriteFile
Error Location
...
- ipc/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Alloc Location
...
@@ -116,33 +116,33 @@ Alloc Location
base/pickle.cc Pickle::BeginWrite(UINT)
base/pickle.cc Pickle::WriteBytes(void const*,int)
base/pickle.cc Pickle::WriteString(basic_string::std const&)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
- ipc/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc MyChannelListener::OnMessageReceived(Message::IPC const&)
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessIncomingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::OnObjectSignaled(void *)
base/message_loop.cc MessageLoop::SignalWatcher(DWORD)
base/message_loop.cc MessageLoop::Run(Dispatcher::MessageLoop *)
base/message_loop.cc MessageLoop::Run(void)
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in strlen
Error Location
...
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Uninitialized memory read in WriteFile
Error Location
...
- ipc/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
- ipc/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_channel.cc IPC::Channel::ProcessOutgoingMessages(void)
+ chrome/common/ipc_channel.cc IPC::Channel::Send(Message::IPC *)
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
Alloc Location
...
@@ -150,8 +150,8 @@ Alloc Location
base/pickle.cc Pickle::BeginWrite(UINT)
base/pickle.cc Pickle::WriteBytes(void const*,int)
base/pickle.cc Pickle::WriteString(basic_string::std const&)
- ipc/ipc_tests.cc Send
- ipc/ipc_tests.cc RunTestClient
- ipc/ipc_tests.cc main
+ chrome/common/ipc_tests.cc Send
+ chrome/common/ipc_tests.cc RunTestClient
+ chrome/common/ipc_tests.cc main
...
diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj
index 508470d..46f501b 100644
--- a/chrome/test/unit/unittests.vcproj
+++ b/chrome/test/unit/unittests.vcproj
@@ -884,6 +884,26 @@
>
</File>
<File
+ RelativePath="..\..\common\ipc_message_unittest.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\common\ipc_sync_channel_unittest.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\common\ipc_sync_channel_unittest.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\common\ipc_sync_message_unittest.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\common\ipc_sync_message_unittest.h"
+ >
+ </File>
+ <File
RelativePath="..\..\common\json_value_serializer_unittest.cc"
>
</File>
diff --git a/chrome/worker/webworkerclient_proxy.cc b/chrome/worker/webworkerclient_proxy.cc
index da489a2..33bcbc8 100644
--- a/chrome/worker/webworkerclient_proxy.cc
+++ b/chrome/worker/webworkerclient_proxy.cc
@@ -5,7 +5,7 @@
#include "chrome/worker/webworkerclient_proxy.h"
#include "chrome/common/child_process.h"
-#include "ipc/ipc_logging.h"
+#include "chrome/common/ipc_logging.h"
#include "chrome/common/worker_messages.h"
#include "chrome/worker/worker_thread.h"
#include "webkit/glue/webworker.h"
diff --git a/chrome/worker/webworkerclient_proxy.h b/chrome/worker/webworkerclient_proxy.h
index 5845d0b..31ee56d 100644
--- a/chrome/worker/webworkerclient_proxy.h
+++ b/chrome/worker/webworkerclient_proxy.h
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/common/ipc_channel.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/webworkerclient.h"
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp
deleted file mode 100644
index a2c1adc..0000000
--- a/ipc/ipc.gyp
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright (c) 2009 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.
-
-{
- 'variables': {
- 'chromium_code': 1,
- },
- 'includes': [
- '../build/common.gypi',
- ],
-
- 'targets': [
- {
- 'target_name': 'ipc',
- 'type': 'static_library',
- 'dependencies': [
- '../base/base.gyp:base',
- '../base/base.gyp:base_gfx',
- ],
- 'sources': [
- 'ipc_channel.h',
- 'ipc_channel_proxy.cc',
- 'ipc_channel_proxy.h',
- 'ipc_counters.cc',
- 'ipc_logging.cc',
- 'ipc_logging.h',
- 'ipc_message.cc',
- 'ipc_message.h',
- 'ipc_message_macros.h',
- 'ipc_message_utils.cc',
- 'ipc_message_utils.h',
- 'ipc_sync_channel.cc',
- 'ipc_sync_channel.h',
- 'ipc_sync_message.cc',
- 'ipc_sync_message.h',
- 'ipc_switches.cc',
- ],
-
- 'conditions': [
- ['OS=="linux"', {'sources': [
- 'ipc_channel_posix.cc',
- 'ipc_channel_posix.h',
- 'file_descriptor_set_posix.cc',
- ]}],
- ['OS=="mac"', {'sources': [
- 'ipc_channel_posix.cc',
- 'ipc_channel_posix.h',
- ]}],
- ['OS=="win"', {'sources': [
- 'ipc_channel_win.cc',
- 'ipc_channel_win.h',
- ]}],
- ],
- },
- {
- 'target_name': 'ipc_tests',
- 'type': 'executable',
- 'dependencies': [
- 'ipc',
- '../base/base.gyp:base',
- '../testing/gtest.gyp:gtest',
- ],
- 'sources': [
- 'ipc_fuzzing_tests.cc',
- 'ipc_sync_channel_unittest.cc',
- 'ipc_sync_message_unittest.cc',
- 'ipc_sync_message_unittest.h',
- 'ipc_tests.cc',
- 'ipc_tests.h',
- ],
- 'conditions': [
- ['OS=="linux"', {'sources': [
- 'ipc_send_fds_test.cc',
- ]}],
- ['OS=="mac"', {'sources': [
- 'ipc_send_fds_test.cc',
- ]}],
- ],
- },
- ],
-}
diff --git a/ipc/ipc_counters.cc b/ipc/ipc_counters.cc
deleted file mode 100644
index 29bf3b5..0000000
--- a/ipc/ipc_counters.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2009 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 "ipc/ipc_counters.h"
-
-#include "base/stats_counters.h"
-
-namespace IPC {
-
-// Note: We use the construct-on-first-use pattern here, because we don't
-// want to fight with any static initializer ordering problems later.
-// The downside of this is that the objects don't ever get cleaned up.
-// But they are small and this is okay.
-
-// Note: Because these are constructed on-first-use, there is a slight
-// race condition - two threads could initialize the same counter.
-// If this happened, the stats table would still work just fine;
-// we'd leak the extraneous StatsCounter object once, and that
-// would be it. But these are small objects, so this is ok.
-
-StatsCounter& Counters::ipc_send_counter() {
- static StatsCounter* ctr = new StatsCounter("IPC.SendMsgCount");
- return *ctr;
-}
-
-} // namespace IPC
diff --git a/ipc/ipc_counters.h b/ipc/ipc_counters.h
deleted file mode 100644
index 647632a..0000000
--- a/ipc/ipc_counters.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2009 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.
-
-// Counters used within the browser.
-
-#ifndef IPC_COMMON_IPC_COUNTERS_H_
-#define IPC_COMMON_IPC_COUNTERS_H_
-
-class StatsCounter;
-
-namespace IPC {
-
-class Counters {
- public:
- // The number of messages sent on IPC channels.
- static StatsCounter& ipc_send_counter();
-};
-
-} // namespace IPC
-
-#endif // IPC_COMMON_IPC_COUNTERS_H_
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
deleted file mode 100644
index 2ee7025..0000000
--- a/ipc/ipc_message_utils.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2006-2008 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 "ipc/ipc_message_utils.h"
-
-#include "base/gfx/rect.h"
-
-namespace IPC {
-
-void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
- m->WriteInt(p.x());
- m->WriteInt(p.y());
-}
-
-bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter,
- gfx::Point* r) {
- int x, y;
- if (!m->ReadInt(iter, &x) ||
- !m->ReadInt(iter, &y))
- return false;
- r->set_x(x);
- r->set_y(y);
- return true;
-}
-
-void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::wstring* l) {
- l->append(StringPrintf(L"(%d, %d)", p.x(), p.y()));
-}
-
-void ParamTraits<gfx::Rect>::Write(Message* m, const gfx::Rect& p) {
- m->WriteInt(p.x());
- m->WriteInt(p.y());
- m->WriteInt(p.width());
- m->WriteInt(p.height());
-}
-
-bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
- int x, y, w, h;
- if (!m->ReadInt(iter, &x) ||
- !m->ReadInt(iter, &y) ||
- !m->ReadInt(iter, &w) ||
- !m->ReadInt(iter, &h))
- return false;
- r->set_x(x);
- r->set_y(y);
- r->set_width(w);
- r->set_height(h);
- return true;
-}
-
-void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::wstring* l) {
- l->append(StringPrintf(L"(%d, %d, %d, %d)", p.x(), p.y(),
- p.width(), p.height()));
-}
-
-void ParamTraits<gfx::Size>::Write(Message* m, const gfx::Size& p) {
- m->WriteInt(p.width());
- m->WriteInt(p.height());
-}
-
-bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
- int w, h;
- if (!m->ReadInt(iter, &w) ||
- !m->ReadInt(iter, &h))
- return false;
- r->set_width(w);
- r->set_height(h);
- return true;
-}
-
-void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::wstring* l) {
- l->append(StringPrintf(L"(%d, %d)", p.width(), p.height()));
-}
-
-} // namespace IPC
diff --git a/ipc/ipc_switches.cc b/ipc/ipc_switches.cc
deleted file mode 100644
index 9d45f7b..0000000
--- a/ipc/ipc_switches.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2009 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 "ipc/ipc_switches.h"
-
-namespace switches {
-
-// On POSIX only: use FIFO for IPC channels so that "unrelated" process
-// can connect to a channel, provided it knows its name. For debugging purposes.
-const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo";
-
-// The value of this switch tells the child process which
-// IPC channel the browser expects to use to communicate with it.
-const wchar_t kProcessChannelID[] = L"channel";
-
-} // namespace switches
diff --git a/ipc/ipc_switches.h b/ipc/ipc_switches.h
deleted file mode 100644
index 7dbc746..0000000
--- a/ipc/ipc_switches.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2009 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.
-
-// Defines command line switches used by the IPC system
-
-#ifndef IPC_IPC_SWITCHES_H__
-#define IPC_IPC_SWITCHES_H__
-
-#include "base/base_switches.h"
-
-namespace switches {
-
-extern const wchar_t kIPCUseFIFO[];
-extern const wchar_t kProcessChannelID[];
-
-} // namespace switches
-
-#endif // IPC_IPC_SWITCHES_H__