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

Issue 23235002: Set up content in-process main threads via factory (Closed)

Created:
7 years, 4 months ago by scottmg
Modified:
7 years, 4 months ago
Reviewers:
jam, piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, jamesr
Visibility:
Public.

Description

Set up content in-process main threads via factory This code was previously #ifdef'd out based on CHROME_MULTIPLE_DLL. This works for chrome, but not for test targets which link content_browser. content_browser needs to not link against child-only targets (as they'll cause linking blink into the browser dll). Instead of having utility_process_host_impl, et al. own the in-process implementation, use a factory to create them that's installed in test code, and in chrome for supporting --single-process. At the same time, remove the global CHROME_MULTIPLE_DLL define and localize it to chrome_exe.gypi because it's too easy to use incorrectly. TBR=darin R=piman@chromium.org,jam@chromium.org BUG=237249 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217968

Patch Set 1 #

Patch Set 2 : same for render_process_host and gpu_process_host #

Patch Set 3 : fix nacl guard and remove unnecessary deps #

Patch Set 4 : . #

Patch Set 5 : fix --single-process #

Patch Set 6 : don't add targets (were already in !ios block) #

Total comments: 2

Patch Set 7 : fwd decl for thread, fix shared_library, unused headers includes #

Patch Set 8 : ios #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -190 lines) Patch
M build/common.gypi View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/app/chrome_main_delegate.cc View 1 2 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/chrome_exe.gypi View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/app/content_main_runner.cc View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M content/browser/DEPS View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/gpu/gpu_process_host.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 3 chunks +10 lines, -44 lines 1 comment Download
M content/browser/renderer_host/DEPS View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 1 chunk +1 line, -3 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 chunks +19 lines, -66 lines 0 comments Download
M content/browser/utility_process_host_impl.h View 1 2 3 4 5 6 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 5 chunks +10 lines, -54 lines 0 comments Download
M content/content_gpu.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/content_utility.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A content/gpu/gpu_main_thread.h View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download
A content/gpu/gpu_main_thread.cc View 1 1 chunk +37 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M content/public/browser/utility_process_host.h View 1 3 chunks +7 lines, -0 lines 0 comments Download
M content/public/test/content_test_suite_base.cc View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
A content/renderer/renderer_main_thread.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A content/renderer/renderer_main_thread.cc View 1 1 chunk +45 lines, -0 lines 0 comments Download
A content/utility/utility_main_thread.h View 1 2 3 4 5 6 1 chunk +40 lines, -0 lines 0 comments Download
A content/utility/utility_main_thread.cc View 1 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
scottmg
piman, could you take a look? (adding jam as fyi, as he reviewed a bunch ...
7 years, 4 months ago (2013-08-15 21:45:03 UTC) #1
piman
lgtm https://codereview.chromium.org/23235002/diff/20001/content/browser/utility_process_host_impl.h File content/browser/utility_process_host_impl.h (right): https://codereview.chromium.org/23235002/diff/20001/content/browser/utility_process_host_impl.h#newcode16 content/browser/utility_process_host_impl.h:16: #include "base/threading/thread.h" nit: forward declare instead?
7 years, 4 months ago (2013-08-15 22:26:10 UTC) #2
scottmg
thanks https://codereview.chromium.org/23235002/diff/20001/content/browser/utility_process_host_impl.h File content/browser/utility_process_host_impl.h (right): https://codereview.chromium.org/23235002/diff/20001/content/browser/utility_process_host_impl.h#newcode16 content/browser/utility_process_host_impl.h:16: #include "base/threading/thread.h" On 2013/08/15 22:26:11, piman wrote: > ...
7 years, 4 months ago (2013-08-15 22:40:37 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/23235002/47001
7 years, 4 months ago (2013-08-16 03:28:21 UTC) #4
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=20936
7 years, 4 months ago (2013-08-16 03:43:44 UTC) #5
scottmg
tbr darin for chrome/app/chrome_main_delegate.cc define rename
7 years, 4 months ago (2013-08-16 03:44:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/23235002/47001
7 years, 4 months ago (2013-08-16 03:45:49 UTC) #7
commit-bot: I haz the power
Change committed as 217968
7 years, 4 months ago (2013-08-16 07:45:45 UTC) #8
jam
7 years, 4 months ago (2013-08-25 08:09:16 UTC) #9
Message was sent while issue was closed.
some nits: 

also:
1) in content.gyp, content_browser shouldn't depend on gpu/utility/renderer
anymore

2) the new files that you're moving need to be renamed to signify that they're
only used for in-process case. otherwise they look like they're being used in
their respective processes.  so in_process_gpu_thread,
in_process_renderer_thread, in_process_utility_thread (you can drop the "main"
in all of these), and of course also rename the classes to match the filenames

https://chromiumcodereview.appspot.com/23235002/diff/47001/content/browser/gp...
File content/browser/gpu/gpu_process_host.cc (right):

https://chromiumcodereview.appspot.com/23235002/diff/47001/content/browser/gp...
content/browser/gpu/gpu_process_host.cc:28: #include "content/gpu/gpu_process.h"
nit: remove these and and "content/gpu" from content/browser/DEPS (the comment
there is out of date, these two files are the only ones that cause that bad
dependency to be there)

Powered by Google App Engine
This is Rietveld 408576698