From dcc7604707e2c564f596b884d28693e49ac72ac6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 27 May 2019 15:17:52 +0200 Subject: Allow projects without field trials to run Change-Id: Iddb00ae4d7362da4b90b7f185acb6914c1b4ff4b Reviewed-by: Peter Varga --- chromium/content/browser/browser_main_loop.cc | 2 ++ chromium/content/browser/child_process_launcher_helper_posix.cc | 4 ++-- chromium/content/browser/renderer_host/render_process_host_impl.cc | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc index dae7f171376..af020f0cd5c 100644 --- a/chromium/content/browser/browser_main_loop.cc +++ b/chromium/content/browser/browser_main_loop.cc @@ -1186,7 +1186,9 @@ void BrowserMainLoop::PostCreateThreadsImpl() { HistogramSynchronizer::GetInstance(); +#ifndef TOOLKIT_QT FieldTrialSynchronizer::CreateInstance(); +#endif // cc assumes a single client name for metrics in a process, which is // is inconsistent with single process mode where both the renderer and diff --git a/chromium/content/browser/child_process_launcher_helper_posix.cc b/chromium/content/browser/child_process_launcher_helper_posix.cc index dd8dff9117f..0891f24e498 100644 --- a/chromium/content/browser/child_process_launcher_helper_posix.cc +++ b/chromium/content/browser/child_process_launcher_helper_posix.cc @@ -59,8 +59,8 @@ std::unique_ptr CreateDefaultPosixFilesToMap( // Mac shared memory doesn't use file descriptors. #if !defined(OS_MAC) int fd = base::FieldTrialList::GetFieldTrialDescriptor(); - DCHECK_NE(fd, -1); - files_to_register->Share(kFieldTrialDescriptor, fd); + if (fd != -1) + files_to_register->Share(kFieldTrialDescriptor, fd); DCHECK(mojo_channel_remote_endpoint.is_valid()); files_to_register->Share( diff --git a/chromium/content/browser/renderer_host/render_process_host_impl.cc b/chromium/content/browser/renderer_host/render_process_host_impl.cc index ca79365591c..e4256767970 100644 --- a/chromium/content/browser/renderer_host/render_process_host_impl.cc +++ b/chromium/content/browser/renderer_host/render_process_host_impl.cc @@ -1931,7 +1931,9 @@ bool RenderProcessHostImpl::Init() { // Call the embedder first so that their IPC filters have priority. GetContentClient()->browser()->RenderProcessWillLaunch(this); +#ifndef TOOLKIT_QT FieldTrialSynchronizer::UpdateRendererVariationsHeader(this); +#endif #if defined(OS_ANDROID) // Initialize the java audio manager so that media session tests will pass. -- cgit v1.2.3