DescriptionEnable content layer to initCommandLine on Android
Previously, in order to initialise CommandLine, you had to know whether
you were running as part of Content Shell, Chrome Shell, or Chrome, and
call the corresponding method.
This led to ugly code like ChromiumSyncAdapter.java having to provide an
abstract initCommandLine method that gets implemented by the subclasses
ChromeShellSyncAdapter.java and ChromeBrowserSyncAdapter.java.
Instead this patch adds an abstract initCommandLine method on
ContentApplication.java, implemented by the subclasses:
- ContentShellApplication
- ChromeShellApplication
- ChromeMobileApplication
- ChromeNativeTestApplication
Thus any code in the content layer can now initialize CommandLine with:
ContentApplication.initCommandLine(context);
BUG=350384
TBR=fgorski@chromium.org
CQ_TRYBOTS=tryserver.chromium:android_aosp,android_arm64_dbg_recipe,android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel,android_clang_dbg_recipe,android_dbg_tests_recipe
Committed: https://crrev.com/c92f3e1f7b7f0bf224daf62e9512b871c4d07147
Cr-Commit-Position: refs/heads/master@{#297830}
Patch Set 1 #
Total comments: 1
Patch Set 2 : ChromiumSyncAdapterTest#testRequestSyncWhenChromeInBackground now asserts true for CommandLine.isIn… #Messages
Total messages: 10 (3 generated)
|