Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 5c9cd720bd74ca281485fdac701c09db6cf00c95..44cc85881ce96a98cca3bc9ec3881905358decf0 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -111,6 +111,40 @@ |
#include "base/mac/foundation_util.h" |
#endif |
+namespace { |
+ |
+int run_count = 0; |
+bool started = false; |
+ |
+void AwesomeTicker(base::TimeTicks scheduled_at) { |
+ if (!scheduled_at.is_null()) { |
+ base::TimeTicks now = base::TimeTicks::HighResNow(); |
+ LOG(ERROR) << "Actual delay: " << (now - scheduled_at).InMicroseconds(); |
+ ++run_count; |
+ } |
+ if (run_count == 10) { |
+ run_count = 0; |
+ started = false; |
+ return; |
+ } |
+ base::MessageLoop::current()->PostDelayedTask( |
+ FROM_HERE, |
+ base::Bind(&AwesomeTicker, base::TimeTicks::HighResNow()), |
+ base::TimeDelta::FromMicroseconds(16666)); |
+} |
+ |
+void EnsureExperimentStarted() { |
+ if (started) |
+ return; |
+ started = true; |
+ base::MessageLoop::current()->PostDelayedTask( |
+ FROM_HERE, |
+ base::Bind(&AwesomeTicker, base::TimeTicks()), |
+ base::TimeDelta::FromSeconds(10)); |
+} |
+ |
+} // namespace |
+ |
// Cross-Site Navigations |
// |
// If a WebContentsImpl is told to navigate to a different web site (as |
@@ -2524,6 +2558,7 @@ void WebContentsImpl::DidCommitProvisionalLoad( |
observers_, |
DidCommitProvisionalLoadForFrame( |
render_frame_host, url, transition_type)); |
+ EnsureExperimentStarted(); |
} |
void WebContentsImpl::DidNavigateMainFramePreCommit( |