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

Unified Diff: chrome/renderer/page_load_histograms.h

Issue 1230513002: Record first layout time UMA metric in PageLoadHistograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move histograms.xml to separate change. Created 5 years, 5 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 | « no previous file | chrome/renderer/page_load_histograms.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/page_load_histograms.h
diff --git a/chrome/renderer/page_load_histograms.h b/chrome/renderer/page_load_histograms.h
index 5eed9bbee814666e3fda0fe8170430f54d58ee56..39f8cc5a9cb8c75d3d70b7dbaa4f5d0c9c38cfc2 100644
--- a/chrome/renderer/page_load_histograms.h
+++ b/chrome/renderer/page_load_histograms.h
@@ -6,6 +6,7 @@
#define CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_
#include "base/basictypes.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/renderer/render_view_observer.h"
namespace blink {
@@ -19,11 +20,13 @@ class DocumentState;
class PageLoadHistograms : public content::RenderViewObserver {
public:
explicit PageLoadHistograms(content::RenderView* render_view);
+ ~PageLoadHistograms() override;
private:
// RenderViewObserver implementation.
void FrameWillClose(blink::WebFrame* frame) override;
void ClosePage() override;
+ void DidUpdateLayout() override;
// Dump all page load histograms appropriate for the given frame.
//
@@ -46,9 +49,14 @@ class PageLoadHistograms : public content::RenderViewObserver {
// so first_paint and first_paint_after_load can be 0.
void Dump(blink::WebFrame* frame);
+ bool ShouldDump(blink::WebFrame* frame);
+ void MaybeDumpFirstLayoutHistograms();
void LogPageLoadTime(const content::DocumentState* load_times,
const blink::WebDataSource* ds) const;
+ bool dumped_first_layout_histograms_;
+ base::WeakPtrFactory<PageLoadHistograms> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms);
};
« no previous file with comments | « no previous file | chrome/renderer/page_load_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698