ResourceLoadingHints turnon work (flag and bug fix)
Adds about:flags support for ResourceLoadingHints and fixes an
issue for determining the initial PreviewsState (where we need
to "allow" ResourceLoadingHints preview even if no hints loaded
for it yet (will be checked at commit time).
Bug: 871795
Change-Id: I52529a29dabf6e5be23c49bf7f597783418d053b
Reviewed-on: https://chromium-review.googlesource.com/1187574
Commit-Queue: Doug Arnett <[email protected]>
Reviewed-by: Ryan Sturm <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586374}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index f609fd0..0ebf23e 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2259,6 +2259,10 @@
{"enable-noscript-previews", flag_descriptions::kEnableNoScriptPreviewsName,
flag_descriptions::kEnableNoScriptPreviewsDescription, kOsAll,
FEATURE_VALUE_TYPE(previews::features::kNoScriptPreviews)},
+ {"enable-resource-loading-hints",
+ flag_descriptions::kEnableResourceLoadingHintsName,
+ flag_descriptions::kEnableResourceLoadingHintsDescription, kOsAll,
+ FEATURE_VALUE_TYPE(previews::features::kResourceLoadingHints)},
{"enable-optimization-hints",
flag_descriptions::kEnableOptimizationHintsName,
flag_descriptions::kEnableOptimizationHintsDescription, kOsAll,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 8ea3991..a78d4da 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -752,6 +752,11 @@
const char kEnableResamplingScrollEventsDescription[] =
"Predicts the scroll amount at vsync time based on previous input";
+const char kEnableResourceLoadingHintsName[] = "Enable resource loading hints";
+const char kEnableResourceLoadingHintsDescription[] =
+ "Enable using server-provided resource loading hints to provide a preview "
+ "over slow network connections.";
+
extern const char kEnableSyncUserConsentSeparateTypeName[] =
"Enable separate sync type for consents";
extern const char kEnableSyncUserConsentSeparateTypeDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 41f2f4afd..4d4e80ce 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -470,6 +470,9 @@
extern const char kEnableResamplingScrollEventsName[];
extern const char kEnableResamplingScrollEventsDescription[];
+extern const char kEnableResourceLoadingHintsName[];
+extern const char kEnableResourceLoadingHintsDescription[];
+
extern const char kEnableSyncUserConsentSeparateTypeName[];
extern const char kEnableSyncUserConsentSeparateTypeDescription[];