Commit 33fe7900 authored by Yuchen Liu's avatar Yuchen Liu Committed by Commit Bot

[Chromecast] Avoid BrowserMain for Android

Due to the recent change of
https://chromium-review.googlesource.com/c/chromium/src/+/1612248

Android specific logic inside of ContentMain is removed. Instead,
MainDelegate::RunProcess should return non negative number to avoid
BrowserMain to be called for Android.

Bug: None
Test: internal CQ
Change-Id: Iedb9f6940cc2f6b7e4cba563c52a6eb6e39e741d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637739Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665293}
parent 738378c2
......@@ -180,7 +180,13 @@ int CastMainDelegate::RunProcess(
// Note: Android must handle running its own browser process.
// See ChromeMainDelegateAndroid::RunProcess.
browser_runner_ = content::BrowserMainRunner::Create();
return browser_runner_->Initialize(main_function_params);
int exit_code = browser_runner_->Initialize(main_function_params);
// On Android we do not run BrowserMain(), so the above initialization of a
// BrowserMainRunner is all we want to occur. Return >= 0 to avoid running
// BrowserMain, while preserving any error codes > 0.
if (exit_code > 0)
return exit_code;
return 0;
#else
return -1;
#endif // defined(OS_ANDROID)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment