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

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

Issue 8404018: chrome.loadTimes() shouldn't be affected by in-document navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge Created 9 years, 1 month 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) 2011 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 {
12 class DocumentState;
13 }
14
11 class RendererHistogramSnapshots; 15 class RendererHistogramSnapshots;
12 16
13 namespace content {
14 class NavigationState;
15 }
16
17 class PageLoadHistograms : public content::RenderViewObserver { 17 class PageLoadHistograms : public content::RenderViewObserver {
18 public: 18 public:
19 PageLoadHistograms(content::RenderView* render_view, 19 PageLoadHistograms(content::RenderView* render_view,
20 RendererHistogramSnapshots* histogram_snapshots); 20 RendererHistogramSnapshots* histogram_snapshots);
21 21
22 private: 22 private:
23 // RenderViewObserver implementation. 23 // RenderViewObserver implementation.
24 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE; 24 virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE;
25 virtual void ClosePage() OVERRIDE; 25 virtual void ClosePage() OVERRIDE;
26 26
(...skipping 13 matching lines...) Expand all
40 // begin: request if it was user requested, start otherwise 40 // begin: request if it was user requested, start otherwise
41 // 41 //
42 // It's possible for the request time not to be set, if a client 42 // It's possible for the request time not to be set, if a client
43 // redirect had been done (the user never requested the page) 43 // redirect had been done (the user never requested the page)
44 // Also, it's possible to load a page without ever laying it out 44 // Also, it's possible to load a page without ever laying it out
45 // so first_paint and first_paint_after_load can be 0. 45 // so first_paint and first_paint_after_load can be 0.
46 void Dump(WebKit::WebFrame* frame); 46 void Dump(WebKit::WebFrame* frame);
47 47
48 void ResetCrossFramePropertyAccess(); 48 void ResetCrossFramePropertyAccess();
49 49
50 void LogPageLoadTime(const content::NavigationState* state, 50 void LogPageLoadTime(const content::DocumentState* load_times,
51 const WebKit::WebDataSource* ds) const; 51 const WebKit::WebDataSource* ds) const;
52 52
53 // Site isolation metric counts. 53 // Site isolation metric counts.
54 // These are per-page-load counts, reset to 0 after they are dumped. 54 // These are per-page-load counts, reset to 0 after they are dumped.
55 int cross_origin_access_count_; 55 int cross_origin_access_count_;
56 int same_origin_access_count_; 56 int same_origin_access_count_;
57 57
58 RendererHistogramSnapshots* histogram_snapshots_; 58 RendererHistogramSnapshots* histogram_snapshots_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms); 60 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms);
61 }; 61 };
62 62
63 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ 63 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/loadtimes_extension_bindings_uitest.cc ('k') | chrome/renderer/page_load_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698