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

Side by Side Diff: chrome/browser/prerender/prerender_plt_recorder.h

Issue 6263014: Add Perceived PageLoad Time (PPLT) metrics for Prerender Experiments,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_PLT_RECORDER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_PLT_RECORDER_H_
7 #pragma once
8
9 #include <list>
10 #include <vector>
11
12 #include "base/scoped_ptr.h"
13 #include "base/time.h"
14 #include "chrome/browser/tab_contents/web_navigation_observer.h"
15 #include "googleurl/src/gurl.h"
16
17 class PrerenderContents;
18 class Profile;
19 class TabContents;
20
21 // PrerenderPLTRecorder is responsible for recording perceived pageload times
22 // to compare PLT's with prerendering enabled and disabled.
23 class PrerenderPLTRecorder : public WebNavigationObserver {
24 public:
25 explicit PrerenderPLTRecorder(TabContents* tab_contents);
26 virtual ~PrerenderPLTRecorder();
27
28 // WebNavigationObserver implementation.
29 virtual bool OnMessageReceived(const IPC::Message& message);
30
31 // Message handler.
32 void OnDidStartProvisionalLoadForFrame(int64 frame_id,
33 bool main_frame,
34 const GURL& url);
35
36 virtual void DidStopLoading();
37
38 private:
39 TabContents* tab_contents_;
40
41 // System time at which the current load was started for the purpose of
42 // the perceived page load time (PPLT).
43 base::TimeTicks pplt_load_start_;
44
45 DISALLOW_COPY_AND_ASSIGN(PrerenderPLTRecorder);
46 };
47
48 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_PLT_RECORDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/prerender/prerender_plt_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698