Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1032)

Unified Diff: chrome/browser/tab_contents/ipc_status_view.cc

Issue 21039: Revert my change to get the tree green. Not sure why the tests became flaky.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.h ('k') | chrome/browser/tab_contents/web_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/ipc_status_view.cc
===================================================================
--- chrome/browser/tab_contents/ipc_status_view.cc (revision 9131)
+++ chrome/browser/tab_contents/ipc_status_view.cc (working copy)
@@ -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 <stdio.h>
@@ -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 @@
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 @@
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() {
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.h ('k') | chrome/browser/tab_contents/web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698