Commit fcdeff20 authored by Mugdha Lakhani's avatar Mugdha Lakhani Committed by Commit Bot

[BackgroundFetch] Remove flag for active fetches.

Access to active fetches is currently behind a feature flag.
This CL takes that out, along with all logic around it.

Bug: 875201
Change-Id: I0bf0ca8ec3eae7ddc5206b639e6a10897476838a
Reviewed-on: https://chromium-review.googlesource.com/c/1388647Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619927}
parent 36dcabf1
......@@ -6,9 +6,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "content/common/background_fetch/background_fetch_types.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
namespace content {
......
......@@ -9,11 +9,9 @@
#include <vector>
#include "base/macros.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/common/background_fetch/background_fetch_types.h"
#include "content/public/common/content_features.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -277,11 +275,6 @@ TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyRecordsUnavailable) {
}
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyRequestCompleted) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(
features::kBackgroundFetchAccessActiveFetches);
ASSERT_TRUE(base::FeatureList::IsEnabled(
features::kBackgroundFetchAccessActiveFetches));
auto observer = std::make_unique<TestRegistrationObserver>();
notifier_->AddObserver(kPrimaryUniqueId, observer->GetPtr());
......
......@@ -518,11 +518,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (!base::FeatureList::IsEnabled(features::kBackgroundFetch))
WebRuntimeFeatures::EnableBackgroundFetch(false);
WebRuntimeFeatures::EnableBackgroundFetchAccessActiveFetches(
base::FeatureList::IsEnabled(
features::kBackgroundFetchAccessActiveFetches) ||
enable_experimental_web_platform_features);
WebRuntimeFeatures::EnableBackgroundFetchUploads(
base::FeatureList::IsEnabled(features::kBackgroundFetchUploads) ||
enable_experimental_web_platform_features);
......
......@@ -57,10 +57,6 @@ const base::Feature kAwaitOptimization{"AwaitOptimization",
const base::Feature kBackgroundFetch{"BackgroundFetch",
base::FEATURE_ENABLED_BY_DEFAULT};
// Enables access to active background fetches.
const base::Feature kBackgroundFetchAccessActiveFetches{
"BackgroundFetchAccessActiveFetches", base::FEATURE_DISABLED_BY_DEFAULT};
// Enables using uploads in a Background Fetch.
const base::Feature kBackgroundFetchUploads{"BackgroundFetchUploads",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -27,7 +27,6 @@ CONTENT_EXPORT extern const base::Feature kAudioServiceLaunchOnStartup;
CONTENT_EXPORT extern const base::Feature kAudioServiceOutOfProcess;
CONTENT_EXPORT extern const base::Feature kAwaitOptimization;
CONTENT_EXPORT extern const base::Feature kBackgroundFetch;
CONTENT_EXPORT extern const base::Feature kBackgroundFetchAccessActiveFetches;
CONTENT_EXPORT extern const base::Feature kBackgroundFetchUploads;
CONTENT_EXPORT extern const base::Feature kBackForwardCache;
CONTENT_EXPORT extern const base::Feature kBlinkHeapIncrementalMarking;
......
......@@ -82,8 +82,6 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableAllowActivationDelegationAttr(bool);
BLINK_PLATFORM_EXPORT static void EnableAudioOutputDevices(bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundFetch(bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundFetchAccessActiveFetches(
bool);
BLINK_PLATFORM_EXPORT static void EnableBackgroundFetchUploads(bool);
BLINK_PLATFORM_EXPORT static void EnableBlinkHeapIncrementalMarking(bool);
BLINK_PLATFORM_EXPORT static void EnableBlinkHeapUnifiedGarbageCollection(
......
......@@ -198,18 +198,6 @@ ScriptPromise BackgroundFetchRegistration::MatchImpl(
mojom::blink::QueryParamsPtr cache_query_params,
ExceptionState& exception_state,
bool match_all) {
// TODO(crbug.com/875201): Update this check once we remove the feature flag
// for active fetches.
if (result_ == mojom::BackgroundFetchResult::UNSET &&
!RuntimeEnabledFeatures::BackgroundFetchAccessActiveFetchesEnabled()) {
return ScriptPromise::RejectWithDOMException(
script_state,
DOMException::Create(
DOMExceptionCode::kInvalidStateError,
"Access to records for in-progress background fetches is not yet "
"implemented. Please see crbug.com/875201 for more details."));
}
if (!records_available_) {
return ScriptPromise::RejectWithDOMException(
script_state,
......
......@@ -598,10 +598,6 @@ void WebRuntimeFeatures::EnableBackgroundFetch(bool enable) {
RuntimeEnabledFeatures::SetBackgroundFetchEnabled(enable);
}
void WebRuntimeFeatures::EnableBackgroundFetchAccessActiveFetches(bool enable) {
RuntimeEnabledFeatures::SetBackgroundFetchAccessActiveFetchesEnabled(enable);
}
void WebRuntimeFeatures::EnableBackgroundFetchUploads(bool enable) {
RuntimeEnabledFeatures::SetBackgroundFetchUploadsEnabled(enable);
}
......
......@@ -117,10 +117,6 @@
origin_trial_feature_name: "BackgroundFetch",
status: "experimental",
},
{
name: "BackgroundFetchAccessActiveFetches",
status: "experimental",
},
{
name: "BackgroundFetchUploads",
status: "experimental",
......
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