
The ContentMainDelegate can already control if BrowserMain() is run so it is not needed in ContentMain() and is a complexity that is harder to understand there, hard to find at all, and a layering violation. The ShellMainDelegate already returns 0 on OS_ANDROID now as of https://chromium-review.googlesource.com/c/chromium/src/+/1609676 but ChromeMainDelegate does not. AwMainDelegate already returns 0 for the browser process always. These are the only ContentMainDelegate impls that are used on Android. Change ChromeMainDelegateAndroid to stop running ChromeMainDelegate's RunProcess() since all it does on Android is return -1. Since the BrowserMainRunnerImpl returns -1 on success, have the delegate catch that and return 0 to avoid running BrowserMain() from ContentMain(). Removes the OS_ANDROID branch from ContentMain(). R=jam@chromium.org Bug: 961849 Change-Id: If1d4ad11c274e23973aa6e6974e62b9352c875bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612248 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#660031}