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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 18254010: IPC fuzzer child process component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no windows support Created 7 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
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 380aa2af72c5514cb2d7b29bf21dbac1b9d9d6fa..733e6df3c3022a012e81f281e4d3790ad90ddcb1 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1343,6 +1343,11 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
if (browser_command_line.HasSwitch(switches::kChromeFrame))
command_line->AppendSwitch(switches::kChromeFrame);
+#if defined(ENABLE_IPC_FUZZER)
+ command_line->CopySwitchFrom(browser_command_line,
+ switches::kIpcFuzzerTestcase);
+#endif
+
if (process_type == switches::kRendererProcess) {
base::FilePath user_data_dir =
browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
@@ -2432,6 +2437,16 @@ void ChromeContentBrowserClient::GetAdditionalFileSystemBackends(
additional_backends->push_back(new sync_file_system::SyncFileSystemBackend());
}
+bool ChromeContentBrowserClient::ShouldKillChildProcessOnBadMessage() {
+#if defined(ENABLE_IPC_FUZZER)
+ // Don't kill the IPC fuzzer process, if it sends a bad message.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kIpcFuzzerTestcase))
+ return false;
+#endif
+
+ return true;
+}
+
#if defined(OS_POSIX) && !defined(OS_MACOSX)
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const CommandLine& command_line,

Powered by Google App Engine
This is Rietveld 408576698