From 071b4b94196fafbf3557771d41db81fa9a7d0ba7 Mon Sep 17 00:00:00 2001 From: "pinkerton@google.com" Date: Mon, 9 Aug 2010 16:06:58 +0000 Subject: Revert 55259 - FBTF: New IPC definitions, only applied to async ROUTED and CONTROL messages. The slowest cc files in chrome include render_messages.h and other IPC message definitions. Including one of these files will bring in half of chrome because in the IPC system previously required full class definitions due to implementation details. The new system allows forward declarations and places the implementations of functions that need the full class definitions (ctor/dtor()/Log() and superclass ctor/Read() methods) into a separate xxx_messages.cc file using a parallel set of macros to ipc_message_macros.h. This has the added benefit of moving most of the template instantiation junk into a small number of files. Pros: - Will speed up compiling by a lot once everything is forward declared. - Already, intermediary .o/.a files are smaller. Cons: - Adds a 4th pass to the messages system, this time in a different header. BUG=51411 TEST=none Review URL: http://codereview.chromium.org/2873090 TBR=erg@google.com Review URL: http://codereview.chromium.org/3080040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55406 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_message_utils_impl.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ipc/ipc_message_utils_impl.h (limited to 'ipc/ipc_message_utils_impl.h') diff --git a/ipc/ipc_message_utils_impl.h b/ipc/ipc_message_utils_impl.h deleted file mode 100644 index 91b4ac9..0000000 --- a/ipc/ipc_message_utils_impl.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file contains templates forward declared (but not defined) in -// ipc_message_utils.h so that they are only instantiated in certain files, -// notably ipc_message_impl_macros.h and a few IPC unit tests. - -#ifndef IPC_IPC_MESSAGE_UTILS_IMPL_H_ -#define IPC_IPC_MESSAGE_UTILS_IMPL_H_ - -namespace IPC { - -template -MessageWithTuple::MessageWithTuple( - int32 routing_id, uint32 type, const RefParam& p) - : Message(routing_id, type, PRIORITY_NORMAL) { - WriteParam(this, p); -} - -template -bool MessageWithTuple::Read(const Message* msg, Param* p) { - void* iter = NULL; - if (ReadParam(msg, &iter, p)) - return true; - NOTREACHED() << "Error deserializing message " << msg->type(); - return false; -} - -// We can't migrate the template for Log() to MessageWithTuple, because each -// subclass needs to have Log() to call Read(), which instantiates the above -// template. - -} // namespace IPC - -#endif // IPC_IPC_MESSAGE_UTILS_IMPL_H_ -- cgit v1.1