Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: content/browser/service_worker/service_worker_fetch_dispatcher.cc

Issue 2434173002: Use kEnableServiceWorkerNavigationPreload feature name in service_worker_fetch_dispatcher.cc (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_fetch_dispatcher.cc
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.cc b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
index e9af208a661c584bc16e48d2fe3e19f5601baf3d..8eac483c670676423c6a39180151c395431ff17f 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
@@ -8,7 +8,7 @@
#include <utility>
#include "base/bind.h"
-#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
@@ -22,6 +22,7 @@
#include "content/common/service_worker/service_worker_utils.h"
#include "content/common/url_loader.mojom.h"
#include "content/common/url_loader_factory.mojom.h"
+#include "content/public/common/content_features.h"
#include "net/log/net_log.h"
#include "net/log/net_log_capture_mode.h"
#include "net/log/net_log_event_type.h"
@@ -288,10 +289,8 @@ void ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload(
// TODO(horo): Currently NavigationPreload doesn't support request body.
if (!request_->blob_uuid.empty())
return;
- // TODO(horo): Introduce kEnableServiceWorkerNavigationPreload switch, and use
- // it instead of kEnableExperimentalWebPlatformFeatures.
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExperimentalWebPlatformFeatures)) {
+ if (!base::FeatureList::IsEnabled(
+ features::kServiceWorkerNavigationPreload)) {
// TODO(horo): Check |version_|'s origin_trial_tokens() here if we use
// Origin-Trial for NavigationPreload.
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698