0

[Background Fetch] Add a kill switch feature flag.

Tested by starting up chrome with --disable-features=BackgroundFetch

Change-Id: I8a1c3de3f7763b51f5384492f28e8afb3e3d9991
Reviewed-on: https://chromium-review.googlesource.com/1240299
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: Mugdha Lakhani <nator@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593922}
This commit is contained in:
Rayan Kanso
2018-09-25 14:24:24 +00:00
committed by Commit Bot
parent 4c3cd553d6
commit a539709b5a
7 changed files with 8 additions and 9 deletions

@ -118,9 +118,6 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
// metadata and controls.
cl->AppendSwitch(switches::kDisableMediaSessionAPI);
// Background Fetch is not supported.
cl->AppendSwitch(switches::kDisableBackgroundFetch);
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
if (cl->GetSwitchValueASCII(switches::kProcessType).empty()) {
// Browser process (no type specified).
@ -192,6 +189,8 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
*cl, autofill::features::kAutofillRestrictUnownedFieldsToFormlessCheckout
.name);
CommandLineHelper::AddDisabledFeature(*cl, features::kBackgroundFetch.name);
android_webview::RegisterPathProvider();
safe_browsing_api_handler_.reset(

@ -2946,7 +2946,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisable2dCanvasImageChromium,
switches::kDisableAcceleratedJpegDecoding,
switches::kDisableAcceleratedVideoDecode,
switches::kDisableBackgroundFetch,
switches::kDisableBackgroundTasks,
switches::kDisableBackgroundTimerThrottling,
switches::kDisableBreakpad,

@ -500,7 +500,7 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::EnablePortals(
base::FeatureList::IsEnabled(blink::features::kPortals));
if (command_line.HasSwitch(switches::kDisableBackgroundFetch))
if (!base::FeatureList::IsEnabled(features::kBackgroundFetch))
WebRuntimeFeatures::EnableBackgroundFetch(false);
WebRuntimeFeatures::EnableNoHoverAfterLayoutChange(

@ -50,6 +50,10 @@ const base::Feature kAudioServiceLaunchOnStartup{
const base::Feature kAudioServiceOutOfProcess{
"AudioServiceOutOfProcess", base::FEATURE_DISABLED_BY_DEFAULT};
// Kill switch for Background Fetch.
const base::Feature kBackgroundFetch{"BackgroundFetch",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enable incremental marking for Blink's heap managed by the Oilpan garbage
// collector.
const base::Feature kBlinkHeapIncrementalMarking{

@ -25,6 +25,7 @@ CONTENT_EXPORT extern const base::Feature kAsmJsToWebAssembly;
CONTENT_EXPORT extern const base::Feature kAudioServiceAudioStreams;
CONTENT_EXPORT extern const base::Feature kAudioServiceLaunchOnStartup;
CONTENT_EXPORT extern const base::Feature kAudioServiceOutOfProcess;
CONTENT_EXPORT extern const base::Feature kBackgroundFetch;
CONTENT_EXPORT extern const base::Feature kBlinkHeapIncrementalMarking;
CONTENT_EXPORT extern const base::Feature kBloatedRendererDetection;
CONTENT_EXPORT extern const base::Feature kBlockCredentialedSubresources;

@ -86,9 +86,6 @@ const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
const char kDisableBackgroundingOccludedWindowsForTesting[] =
"disable-backgrounding-occluded-windows";
// Disable Background Fetch.
const char kDisableBackgroundFetch[] = "disable-background-fetch";
// Disable task throttling of timer tasks from background pages.
const char kDisableBackgroundTimerThrottling[] =
"disable-background-timer-throttling";

@ -38,7 +38,6 @@ CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
extern const char kDisableBackingStoreLimit[];
CONTENT_EXPORT extern const char
kDisableBackgroundingOccludedWindowsForTesting[];
CONTENT_EXPORT extern const char kDisableBackgroundFetch[];
CONTENT_EXPORT extern const char kDisableBackgroundTimerThrottling[];
CONTENT_EXPORT extern const char kDisableBlinkFeatures[];
CONTENT_EXPORT extern const char kDisableCompositorUkmForTests[];