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

Unified Diff: chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h

Issue 2901383002: Buffer cross frame paint timing updates. (Closed)
Patch Set: fix android build Created 3 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: chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h b/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h
index 47f6e4f5171e0534183f852a14dad6a3af9cfc08..3b9d65cc6fed1476261de5d8b9289565077749c3 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/time/time.h"
+#include "base/timer/timer.h"
Charlie Harrison 2017/05/26 19:31:34 Can just fwd declare I think
Bryan McQuade 2017/05/26 20:07:32 Done
#include "chrome/common/page_load_metrics/page_load_metrics.mojom.h"
namespace content {
@@ -65,6 +66,8 @@ enum PageLoadTimingStatus {
};
extern const char kPageLoadTimingStatus[];
+extern const char kHistogramOutOfOrderTiming[];
+extern const char kHistogramOutOfOrderTimingBuffered[];
} // namespace internal
@@ -122,12 +125,7 @@ class PageLoadMetricsUpdateDispatcher {
void UpdateMainFrameMetadata(const mojom::PageLoadMetadata& new_metadata);
void UpdateSubFrameMetadata(const mojom::PageLoadMetadata& subframe_metadata);
- // Merge values from |new_paint_timing| into |pending_merged_page_timing_|,
- // offsetting any new timings by the |navigation_start_offset|.
- void MergePaintTiming(base::TimeDelta navigation_start_offset,
- const mojom::PaintTiming& new_paint_timing,
- bool is_main_frame);
-
+ void MaybeDispatchTimingUpdates(bool did_merge_new_timing_value);
void DispatchTimingUpdates();
// The client is guaranteed to outlive this object.
@@ -136,6 +134,8 @@ class PageLoadMetricsUpdateDispatcher {
// Interface to chrome features. Must outlive the class.
PageLoadMetricsEmbedderInterface* const embedder_interface_;
+ std::unique_ptr<base::Timer> timer_;
+
// Time the navigation for this page load was initiated.
const base::TimeTicks navigation_start_;

Powered by Google App Engine
This is Rietveld 408576698