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

Unified Diff: content/common/content_switches_internal.cc

Issue 1860743002: Add a flag to change when android's progress bar completes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing flag default Created 4 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 | « content/common/content_switches_internal.h ('k') | content/public/common/common_param_traits_macros.h » ('j') | 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 e3949845e3ebb5b679cc324634f2960e084580e4..2c385d5844e809fcf6ec4655a855db7fe8133b60 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -81,4 +81,24 @@ bool IsUseZoomForDSFEnabled() {
return enabled;
}
+ProgressBarCompletion GetProgressBarCompletionPolicy() {
+#if defined(OS_ANDROID)
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ std::string progress_bar_completion =
+ command_line.GetSwitchValueASCII(switches::kProgressBarCompletion);
+ if (progress_bar_completion == "loadEvent")
+ return ProgressBarCompletion::LOAD_EVENT;
+ if (progress_bar_completion == "resourcesBeforeDOMContentLoaded")
+ return ProgressBarCompletion::RESOURCES_BEFORE_DCL;
+ if (progress_bar_completion == "domContentLoaded")
+ return ProgressBarCompletion::DOM_CONTENT_LOADED;
+ if (progress_bar_completion ==
+ "resourcesBeforeDOMContentLoadedAndSameOriginIframes") {
+ return ProgressBarCompletion::RESOURCES_BEFORE_DCL_AND_SAME_ORIGIN_IFRAMES;
+ }
+#endif
+ return ProgressBarCompletion::LOAD_EVENT;
+}
+
} // namespace content
« no previous file with comments | « content/common/content_switches_internal.h ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698