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

Side by Side Diff: chrome/renderer/page_load_histograms.h

Issue 10454086: Histograms - Support histograms for Plugins, GPU (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ 5 #ifndef CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_
6 #define CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ 6 #define CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "content/public/renderer/render_view_observer.h" 9 #include "content/public/renderer/render_view_observer.h"
10 10
11 namespace content { 11 namespace content {
12 class DocumentState; 12 class DocumentState;
13 } 13 }
14 14
15 class RendererHistogramSnapshots;
16
17 class PageLoadHistograms : public content::RenderViewObserver { 15 class PageLoadHistograms : public content::RenderViewObserver {
18 public: 16 public:
19 PageLoadHistograms(content::RenderView* render_view, 17 explicit PageLoadHistograms(content::RenderView* render_view);
20 RendererHistogramSnapshots* histogram_snapshots);
21 18
22 private: 19 private:
23 // RenderViewObserver implementation. 20 // RenderViewObserver implementation.
24 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE; 21 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE;
25 virtual void ClosePage() OVERRIDE; 22 virtual void ClosePage() OVERRIDE;
26 23
27 // Dump all page load histograms appropriate for the given frame. 24 // Dump all page load histograms appropriate for the given frame.
28 // 25 //
29 // This method will only dump once-per-instance, so it is safe to call 26 // This method will only dump once-per-instance, so it is safe to call
30 // multiple times. 27 // multiple times.
(...skipping 17 matching lines...) Expand all
48 void ResetCrossFramePropertyAccess(); 45 void ResetCrossFramePropertyAccess();
49 46
50 void LogPageLoadTime(const content::DocumentState* load_times, 47 void LogPageLoadTime(const content::DocumentState* load_times,
51 const WebKit::WebDataSource* ds) const; 48 const WebKit::WebDataSource* ds) const;
52 49
53 // Site isolation metric counts. 50 // Site isolation metric counts.
54 // These are per-page-load counts, reset to 0 after they are dumped. 51 // These are per-page-load counts, reset to 0 after they are dumped.
55 int cross_origin_access_count_; 52 int cross_origin_access_count_;
56 int same_origin_access_count_; 53 int same_origin_access_count_;
57 54
58 RendererHistogramSnapshots* histogram_snapshots_;
59
60 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms); 55 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms);
61 }; 56 };
62 57
63 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ 58 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698