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

Unified Diff: chrome/browser/about_flags.cc

Issue 2916533002: Introduce chrome://flags/#network-prediction-options-for-service-worker
Patch Set: use StartServiceWorkerForNavigationHint Created 3 years, 6 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 | chrome/browser/chrome_service_worker_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 855a0ffa4c5b42d3a1e78e4a308caa715a347014..a9983f04b37915906a1af62750ab9777888d658f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -28,6 +28,7 @@
#include "cc/base/switches.h"
#include "chrome/browser/experiments/memory_ablation_experiment.h"
#include "chrome/browser/flag_descriptions.h"
+#include "chrome/browser/net/prediction_options.h"
#include "chrome/browser/predictors/resource_prefetch_common.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/common/channel_info.h"
@@ -860,6 +861,23 @@ const FeatureEntry::FeatureVariation
{"Learning", kSpeculativeResourcePrefetchingLearning,
arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}};
+const FeatureEntry::Choice kNetworkPredictionOptionsForServiceWorkerChoices[] =
+ {
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
+ {chrome_browser_net::kPreconnectOnly,
+ switches::kNetworkPredictionOptionsForServiceWorker,
+ chrome_browser_net::kPreconnectOnly},
+ {chrome_browser_net::kStartServiceWorkerAndPreconnect,
+ switches::kNetworkPredictionOptionsForServiceWorker,
+ chrome_browser_net::kStartServiceWorkerAndPreconnect},
+ {chrome_browser_net::kStartServiceWorkerAndDeferPreconnect,
+ switches::kNetworkPredictionOptionsForServiceWorker,
+ chrome_browser_net::kStartServiceWorkerAndDeferPreconnect},
+ {chrome_browser_net::kStartServiceWorkerOnly,
+ switches::kNetworkPredictionOptionsForServiceWorker,
+ chrome_browser_net::kStartServiceWorkerOnly},
+};
+
#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \
defined(OS_WIN)
const FeatureEntry::FeatureParam kPauseBackgroundTabsMinimalEngagment[] = {
@@ -2874,6 +2892,12 @@ const FeatureEntry kFeatureEntries[] = {
kSpeculativeResourcePrefetchingFeatureVariations,
"SpeculativeResourcePrefetchingValidation")},
+ {"network-prediction-options-for-service-worker",
+ flag_descriptions::kNetworkPredictionOptionsForServiceWorkerName,
+ flag_descriptions::kNetworkPredictionOptionsForServiceWorkerDescription,
+ kOsAll,
+ MULTI_VALUE_TYPE(kNetworkPredictionOptionsForServiceWorkerChoices)},
+
{"enable-off-main-thread-fetch", flag_descriptions::kOffMainThreadFetchName,
flag_descriptions::kOffMainThreadFetchDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kOffMainThreadFetch)},
« no previous file with comments | « no previous file | chrome/browser/chrome_service_worker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698