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

Unified Diff: content/common/content_switches_internal.cc

Issue 2445453002: Add a base::Feature to change progress bar completion policy. (Closed)
Patch Set: Fix bracket spacing 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/common/content_switches_internal.cc
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index eeb18a7603b40c6987a33bbfe248b5fe2591a163..105a9d193205bcc84f85e7140a79f72c21609169 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -36,6 +36,12 @@ bool IsUseZoomForDSFEnabledByDefault() {
#endif
}
+#if defined(ANDROID)
+const base::Feature kProgressBarCompletionResourcesBeforeDOMContentLoaded {
+ "progress-bar-completion-resources-before-domContentLoaded",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+#endif
+
} // namespace
bool IsPinchToZoomEnabled() {
@@ -106,6 +112,12 @@ ProgressBarCompletion GetProgressBarCompletionPolicy() {
"resourcesBeforeDOMContentLoadedAndSameOriginIframes") {
return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES;
}
+ // The command line, which is set by the user, takes priority. Otherwise,
+ // fall back to the feature flag.
+ if (base::FeatureList::IsEnabled(
+ kProgressBarCompletionResourcesBeforeDOMContentLoaded)) {
+ return ProgressBarCompletion::RESOURCES_BEFORE_DCL;
+ }
#endif
return ProgressBarCompletion::LOAD_EVENT;
}
« 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