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 |