From 3ef408a32c352d86fbc1346304e0a6ffbbe12c0b Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 12 Mar 2015 14:23:51 +0100 Subject: Enable the use of IPC tracing This can be used with debug builds, or by passing DEFINES+=IPC_MESSAGE_LOG_ENABLED at qmake time. IPC message logging is then controlled by the CHROME_IPC_LOGGING environment variable (e.g. CHROME_IPC_LOGGING=color). Change-Id: I0e423e716582f339cd4a30bf99e284bdefe00313 Reviewed-by: Andras Becsi --- src/core/content_main_delegate_qt.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index b8e40a448..7c2dde8c4 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -40,6 +40,8 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" +#include "content/public/browser/browser_ipc_logging.h" +#include "content/public/browser/browser_thread.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "ui/base/l10n/l10n_util.h" @@ -81,6 +83,10 @@ void ContentMainDelegateQt::PreSandboxStartup() } logging::SetMinLogLevel(logLevel); + +#if defined(IPC_MESSAGE_LOG_ENABLED) + content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, base::Bind(&content::EnableIPCLogging, true)); +#endif } content::ContentBrowserClient *ContentMainDelegateQt::CreateContentBrowserClient() -- cgit v1.2.3