summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@theqtcompany.com>2015-03-12 14:23:51 +0100
committerPierre Rossi <pierre.rossi@theqtcompany.com>2015-03-19 10:53:07 +0000
commit3ef408a32c352d86fbc1346304e0a6ffbbe12c0b (patch)
tree6bdde7b53952bc07c702b3eb8f305a7e3ec9c7bd
parentc2ea7b1babdb7748e08a1f2442f13abac357d194 (diff)
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 <andras.becsi@theqtcompany.com>
-rw-r--r--src/core/content_main_delegate_qt.cpp6
1 files changed, 6 insertions, 0 deletions
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()