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

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: Created 4 years, 7 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
Index: content/common/content_switches_internal.cc
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index 17cacedc66173b8aa6a8a512c0035bf603c986e0..e55101d5c0797451147768b99fbb19238934a35e 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -77,4 +77,20 @@ bool IsUseZoomForDSFEnabled() {
return enabled;
}
+ProgressBarCompletionOptions GetProgressBarCompletionOptions() {
+#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 PROGRESS_BAR_COMPLETION_LOAD_EVENT;
+ if (progress_bar_completion == "dclAndImages")
dcheng 2016/05/10 06:28:50 My main concern here is that it's not immediately
Nate Chapin 2016/05/11 00:06:58 I expanded the flag to domContentLoadedAndImages,
+ return PROGRESS_BAR_COMPLETION_DOM_CONTENT_LOADED_AND_IMAGES;
+ if (progress_bar_completion == "domContentLoaded")
+ return PROGRESS_BAR_COMPLETION_DOM_CONTENT_LOADED;
+#endif
+ return PROGRESS_BAR_COMPLETION_LOAD_EVENT;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698