From 7d5c3acd124fae8816416374f629752138ec08e1 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Wed, 4 Feb 2009 08:58:19 +0000 Subject: Revert my change to get the tree green. Not sure why the tests became flaky. I'll try to check them in again but in smaller chunks tomorrow. TBR=mpcomplete Review URL: http://codereview.chromium.org/21039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9132 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/ipc_status_view.cc | 33 +++++++++++++------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'chrome/browser/tab_contents/ipc_status_view.cc') diff --git a/chrome/browser/tab_contents/ipc_status_view.cc b/chrome/browser/tab_contents/ipc_status_view.cc index a317aac..cd85ee0 100644 --- a/chrome/browser/tab_contents/ipc_status_view.cc +++ b/chrome/browser/tab_contents/ipc_status_view.cc @@ -2,13 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Need to include this before any other file because it defines -// IPC_MESSAGE_LOG_ENABLED. -#include "chrome/common/ipc_message.h" - -#ifdef IPC_MESSAGE_LOG_ENABLED -#define IPC_MESSAGE_MACROS_LOG_ENABLED - #include "chrome/browser/tab_contents/ipc_status_view.h" #include @@ -24,6 +17,8 @@ #include "chrome/common/pref_service.h" #include "chrome/common/render_messages.h" +#ifdef IPC_MESSAGE_LOG_ENABLED + using base::Time; namespace { @@ -44,6 +39,19 @@ enum { kParamsColumn, }; +// This class ensures that we have a link dependency on render_messages.cc and +// plugin_messages.cc, and at the same time sets up the message logger function +// mappings. +class RegisterLoggerFuncs { + public: + RegisterLoggerFuncs() { + RenderMessagesInit(); + PluginMessagesInit(); + } +}; + +RegisterLoggerFuncs g_register_logger_funcs; + } // namespace IPCStatusView* IPCStatusView::current_; @@ -62,16 +70,7 @@ IPCStatusView::IPCStatusView() plugin_process_ = NULL; plugin_process_host_ = NULL; - IPC::Logging* log = IPC::Logging::current(); - log->RegisterMessageLogger(ViewStart, ViewMsgLog); - log->RegisterMessageLogger(ViewHostStart, ViewHostMsgLog); - log->RegisterMessageLogger(PluginProcessStart, PluginProcessMsgLog); - log->RegisterMessageLogger(PluginProcessHostStart, PluginProcessHostMsgLog); - log->RegisterMessageLogger(PluginStart, PluginMsgLog); - log->RegisterMessageLogger(PluginHostStart, PluginHostMsgLog); - log->RegisterMessageLogger(NPObjectStart, NPObjectMsgLog); - - log->SetConsumer(this); + IPC::Logging::current()->SetConsumer(this); } IPCStatusView::~IPCStatusView() { -- cgit v1.1