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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 478483005: Add IPC benchmarking API to Blink TestRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 4 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 | « content/shell/browser/ipc_echo_message_filter.cc ('k') | content/shell/common/shell_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 4bf20943c85f67364cac79011ccb3d793598ed20..b2f85d228dab4172656929ebb12cc0258e3089bf 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -16,6 +16,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
+#include "content/shell/browser/ipc_echo_message_filter.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_browser_context.h"
#include "content/shell/browser/shell_browser_main_parts.h"
@@ -170,6 +171,8 @@ BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
void ShellContentBrowserClient::RenderProcessWillLaunch(
RenderProcessHost* host) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kExposeIpcEcho))
+ host->AddFilter(new IPCEchoMessageFilter());
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
host->AddFilter(new ShellMessageFilter(
@@ -240,6 +243,9 @@ void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kExposeInternalsForTesting))
command_line->AppendSwitch(switches::kExposeInternalsForTesting);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kExposeIpcEcho))
+ command_line->AppendSwitch(switches::kExposeIpcEcho);
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kStableReleaseMode))
command_line->AppendSwitch(switches::kStableReleaseMode);
if (CommandLine::ForCurrentProcess()->HasSwitch(
« no previous file with comments | « content/shell/browser/ipc_echo_message_filter.cc ('k') | content/shell/common/shell_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698