Skip to content

Commit

Permalink
Remove the --disable_updater_module flag (#3286)
Browse files Browse the repository at this point in the history
b/341095156

Change-Id: Id4081360a9cf987cfdb3d1ccdde53ee4e78a492c
  • Loading branch information
yuying-y authored May 21, 2024
1 parent 48866e0 commit dff0d2a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 83 deletions.
3 changes: 1 addition & 2 deletions cobalt/browser/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,7 @@ Application::Application(const base::Closure& quit_closure, bool should_preload,
AddCrashHandlerAnnotations(platform_info);

#if SB_IS(EVERGREEN)
if (SbSystemGetExtension(kCobaltExtensionInstallationManagerName) &&
!command_line->HasSwitch(switches::kDisableUpdaterModule)) {
if (SbSystemGetExtension(kCobaltExtensionInstallationManagerName)) {
uint64_t update_check_delay_sec =
cobalt::updater::kDefaultUpdateCheckDelaySeconds;
if (command_line->HasSwitch(browser::switches::kUpdateCheckDelaySeconds)) {
Expand Down
140 changes: 69 additions & 71 deletions cobalt/browser/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ const char kDisableTimerResolutionLimitHelp[] =
"removed and the resolution will be 1us (or larger depending on the "
"platform.";

const char kDisableUpdaterModule[] = "disable_updater_module";
const char kDisableUpdaterModuleHelp[] =
"Disables the Cobalt Evergreen UpdaterModule which is responsible for "
"downloading and installing new Cobalt updates. Passing the flag is "
"equivalent to opting out from further updates.";

const char kEncodedImageCacheSizeInBytes[] =
"encoded_image_cache_size_in_bytes";
const char kEncodedImageCacheSizeInBytesHelp[] =
Expand Down Expand Up @@ -437,75 +431,79 @@ const char kVideoPlaybackRateMultiplierHelp[] =

std::string HelpMessage() {
std::string help_message;
std::map<std::string, const char*> help_map {
std::map<std::string, const char*> help_map{
#if defined(ENABLE_DEBUG_COMMAND_LINE_SWITCHES)
{kDebugConsoleMode, kDebugConsoleModeHelp},
{kDevServersListenIp, kDevServersListenIpHelp},
{kDebugConsoleMode, kDebugConsoleModeHelp},
{kDevServersListenIp, kDevServersListenIpHelp},
#if defined(ENABLE_DEBUGGER)
{kDisableWebDebugger, kDisableWebDebuggerHelp},
{kRemoteDebuggingPort, kRemoteDebuggingPortHelp},
{kWaitForWebDebugger, kWaitForWebDebuggerHelp},
{kDisableWebDebugger, kDisableWebDebuggerHelp},
{kRemoteDebuggingPort, kRemoteDebuggingPortHelp},
{kWaitForWebDebugger, kWaitForWebDebuggerHelp},
#endif // ENABLE_DEBUGGER
{kDisableImageAnimations, kDisableImageAnimationsHelp},
{kForceDeterministicRendering, kForceDeterministicRenderingHelp},
{kDisableMediaCodecs, kDisableMediaCodecsHelp},
{kDisableMediaEncryptionSchemes, kDisableMediaEncryptionSchemesHelp},
{kDisableOnScreenKeyboard, kDisableOnScreenKeyboardHelp},
{kDisableRasterizerCaching, kDisableRasterizerCachingHelp},
{kDisableSignIn, kDisableSignInHelp},
{kDisableSplashScreenOnReloads, kDisableSplashScreenOnReloadsHelp},
{kDisableWebDriver, kDisableWebDriverHelp},
{kExtraWebFileDir, kExtraWebFileDirHelp},
{kFakeMicrophone, kFakeMicrophoneHelp},
{kIgnoreCertificateErrors, kIgnoreCertificateErrorsHelp},
{kInputFuzzer, kInputFuzzerHelp},
{kMinCompatibilityVersion, kMinCompatibilityVersionHelp},
{kNullSavegame, kNullSavegameHelp}, {kProd, kProdHelp},
{kRequireCSP, kRequireCSPHelp},
{kAllowAllCrossOrigin, kAllowAllCrossOriginHelp},
{kRequireHTTPSLocation, kRequireHTTPSLocationHelp},
{kShutdownAfter, kShutdownAfterHelp},
{kStubImageDecoder, kStubImageDecoderHelp},
{kSuspendFuzzer, kSuspendFuzzerHelp}, {kTimedTrace, kTimedTraceHelp},
{kUserAgent, kUserAgentHelp},
{kUserAgentClientHints, kUserAgentClientHintsHelp},
{kUserAgentOsNameVersion, kUserAgentOsNameVersionHelp},
{kUseTTS, kUseTTSHelp}, {kWatchdog, kWatchdogHelp},
{kWebDriverPort, kWebDriverPortHelp},
{kDisableImageAnimations, kDisableImageAnimationsHelp},
{kForceDeterministicRendering, kForceDeterministicRenderingHelp},
{kDisableMediaCodecs, kDisableMediaCodecsHelp},
{kDisableMediaEncryptionSchemes, kDisableMediaEncryptionSchemesHelp},
{kDisableOnScreenKeyboard, kDisableOnScreenKeyboardHelp},
{kDisableRasterizerCaching, kDisableRasterizerCachingHelp},
{kDisableSignIn, kDisableSignInHelp},
{kDisableSplashScreenOnReloads, kDisableSplashScreenOnReloadsHelp},
{kDisableWebDriver, kDisableWebDriverHelp},
{kExtraWebFileDir, kExtraWebFileDirHelp},
{kFakeMicrophone, kFakeMicrophoneHelp},
{kIgnoreCertificateErrors, kIgnoreCertificateErrorsHelp},
{kInputFuzzer, kInputFuzzerHelp},
{kMinCompatibilityVersion, kMinCompatibilityVersionHelp},
{kNullSavegame, kNullSavegameHelp},
{kProd, kProdHelp},
{kRequireCSP, kRequireCSPHelp},
{kAllowAllCrossOrigin, kAllowAllCrossOriginHelp},
{kRequireHTTPSLocation, kRequireHTTPSLocationHelp},
{kShutdownAfter, kShutdownAfterHelp},
{kStubImageDecoder, kStubImageDecoderHelp},
{kSuspendFuzzer, kSuspendFuzzerHelp},
{kTimedTrace, kTimedTraceHelp},
{kUserAgent, kUserAgentHelp},
{kUserAgentClientHints, kUserAgentClientHintsHelp},
{kUserAgentOsNameVersion, kUserAgentOsNameVersionHelp},
{kUseTTS, kUseTTSHelp},
{kWatchdog, kWatchdogHelp},
{kWebDriverPort, kWebDriverPortHelp},
#endif // ENABLE_DEBUG_COMMAND_LINE_SWITCHES
{kDisableJavaScriptJit, kDisableJavaScriptJitHelp},
{kDisableMapToMesh, kDisableMapToMeshHelp},
{kDisableTimerResolutionLimit, kDisableTimerResolutionLimitHelp},
{kDisableUpdaterModule, kDisableUpdaterModuleHelp},
{kEncodedImageCacheSizeInBytes, kEncodedImageCacheSizeInBytesHelp},
{kForceMigrationForStoragePartitioning,
kForceMigrationForStoragePartitioningHelp},
{kFPSPrint, kFPSPrintHelp}, {kFPSOverlay, kFPSOverlayHelp},
{kHelp, kHelpHelp},
{kImageCacheSizeInBytes, kImageCacheSizeInBytesHelp},
{kInitialURL, kInitialURLHelp},
{kLocalStoragePartitionUrl, kLocalStoragePartitionUrlHelp},
{kMaxCobaltCpuUsage, kMaxCobaltCpuUsageHelp},
{kMaxCobaltGpuUsage, kMaxCobaltGpuUsageHelp},
{kMinLogLevel, kMinLogLevelHelp},
{kOffscreenTargetCacheSizeInBytes,
kOffscreenTargetCacheSizeInBytesHelp},
{kOmitDeviceAuthenticationQueryParameters,
kOmitDeviceAuthenticationQueryParametersHelp},
{kProxy, kProxyHelp}, {kQrCodeOverlay, kQrCodeOverlayHelp},
{kRemoteTypefaceCacheSizeInBytes, kRemoteTypefaceCacheSizeInBytesHelp},
{kRetainRemoteTypefaceCacheDuringSuspend,
kRetainRemoteTypefaceCacheDuringSuspendHelp},
{kScratchSurfaceCacheSizeInBytes, kScratchSurfaceCacheSizeInBytesHelp},
{kSilenceInlineScriptWarnings, kSilenceInlineScriptWarningsHelp},
{kSkiaCacheSizeInBytes, kSkiaCacheSizeInBytesHelp},
{kSkiaTextureAtlasDimensions, kSkiaTextureAtlasDimensionsHelp},
{kFallbackSplashScreenURL, kFallbackSplashScreenURLHelp},
{kUpdateCheckDelaySeconds, kUpdateCheckDelaySecondsHelp},
{kUseCompressedUpdates, kUseCompressedUpdatesHelp},
{kUseQAUpdateServer, kUseQAUpdateServerHelp}, {kVersion, kVersionHelp},
{kViewport, kViewportHelp},
{kVideoPlaybackRateMultiplier, kVideoPlaybackRateMultiplierHelp},
{kDisableJavaScriptJit, kDisableJavaScriptJitHelp},
{kDisableMapToMesh, kDisableMapToMeshHelp},
{kDisableTimerResolutionLimit, kDisableTimerResolutionLimitHelp},
{kEncodedImageCacheSizeInBytes, kEncodedImageCacheSizeInBytesHelp},
{kForceMigrationForStoragePartitioning,
kForceMigrationForStoragePartitioningHelp},
{kFPSPrint, kFPSPrintHelp},
{kFPSOverlay, kFPSOverlayHelp},
{kHelp, kHelpHelp},
{kImageCacheSizeInBytes, kImageCacheSizeInBytesHelp},
{kInitialURL, kInitialURLHelp},
{kLocalStoragePartitionUrl, kLocalStoragePartitionUrlHelp},
{kMaxCobaltCpuUsage, kMaxCobaltCpuUsageHelp},
{kMaxCobaltGpuUsage, kMaxCobaltGpuUsageHelp},
{kMinLogLevel, kMinLogLevelHelp},
{kOffscreenTargetCacheSizeInBytes, kOffscreenTargetCacheSizeInBytesHelp},
{kOmitDeviceAuthenticationQueryParameters,
kOmitDeviceAuthenticationQueryParametersHelp},
{kProxy, kProxyHelp},
{kQrCodeOverlay, kQrCodeOverlayHelp},
{kRemoteTypefaceCacheSizeInBytes, kRemoteTypefaceCacheSizeInBytesHelp},
{kRetainRemoteTypefaceCacheDuringSuspend,
kRetainRemoteTypefaceCacheDuringSuspendHelp},
{kScratchSurfaceCacheSizeInBytes, kScratchSurfaceCacheSizeInBytesHelp},
{kSilenceInlineScriptWarnings, kSilenceInlineScriptWarningsHelp},
{kSkiaCacheSizeInBytes, kSkiaCacheSizeInBytesHelp},
{kSkiaTextureAtlasDimensions, kSkiaTextureAtlasDimensionsHelp},
{kFallbackSplashScreenURL, kFallbackSplashScreenURLHelp},
{kUpdateCheckDelaySeconds, kUpdateCheckDelaySecondsHelp},
{kUseCompressedUpdates, kUseCompressedUpdatesHelp},
{kUseQAUpdateServer, kUseQAUpdateServerHelp},
{kVersion, kVersionHelp},
{kViewport, kViewportHelp},
{kVideoPlaybackRateMultiplier, kVideoPlaybackRateMultiplierHelp},
};

for (const auto& switch_message : help_map) {
Expand Down
2 changes: 0 additions & 2 deletions cobalt/browser/switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ extern const char kDisableMapToMesh[];
extern const char kDisableMapToMeshHelp[];
extern const char kDisableTimerResolutionLimit[];
extern const char kDisableTimerResolutionLimitHelp[];
extern const char kDisableUpdaterModule[];
extern const char kDisableUpdaterModuleHelp[];
extern const char kEncodedImageCacheSizeInBytes[];
extern const char kEncodedImageCacheSizeInBytesHelp[];
extern const char kForceMigrationForStoragePartitioning[];
Expand Down
12 changes: 4 additions & 8 deletions starboard/doc/evergreen/cobalt_evergreen_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,6 @@ behavior can be easily configured on a per-app basis with simple command-line fl
The configurable options for Cobalt Updater configuration are:
* `--evergreen_lite` *Use the System Image version of Cobalt under Slot_0 and turn
off the updater for the specified application.*
* `--disable_updater_module` *Stay on the current version of Cobalt that might be the
system image or an installed update, and turn off the updater for the
specified application.*

Each app’s Cobalt Updater will perform an independent, regular check for new
Cobalt Evergreen updates. Note that all apps will share the same set of slots,
Expand Down Expand Up @@ -637,7 +634,7 @@ existing slot. In this case, `APP_1` and `APP_2` are now using the same Cobalt
binaries in SLOT_2.

If `APP_3` has not been launched, not run through a regular Cobalt Updater
check, or launched with the `--evergreen_lite`/`--disable_updater_module` flag,
check, or launched with the `--evergreen_lite` flag,
it stays with its current configuration.

#### AFTER COBALT UPDATE
Expand All @@ -664,15 +661,14 @@ loader_app --url="<YOUR_APP_2_URL>"
loader_app --url="<YOUR_APP_3_URL>"
# Only APP_1 gets Evergreen Updates, APP_2 disables the updater and uses an alternate splash screen, APP_3 uses
# APP_1 gets Evergreen Updates, APP_2 uses an alternate splash screen, APP_3 uses
# the system image and disables the updater
[APP_1] (Cobalt Updater ENABLED)
[APP_2] (Cobalt Updater DISABLED)
[APP_2] (Cobalt Updater ENABLED)
[APP_3] (System Image loaded, Cobalt Updater DISABLED)
loader_app --url="<YOUR_APP_1_URL>"
loader_app --url="<YOUR_APP_2_URL>" --disable_updater_module \
--fallback_splash_screen_url="/<PATH_TO_APP_2>/app_2_splash_screen.html"
loader_app --url="<YOUR_APP_2_URL>" --fallback_splash_screen_url="/<PATH_TO_APP_2>/app_2_splash_screen.html"
loader_app --url="<YOUR_APP_3_URL>" --evergreen_lite
Expand Down

0 comments on commit dff0d2a

Please sign in to comment.