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

Side by Side Diff: content/common/tab_load_stats.h

Issue 12389073: Collect tab timing information for use in telementry-based startup tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: formatting/compile fix Created 7 years, 8 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) 2013 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 CONTENT_COMMON_TAB_LOAD_STATS_H_
6 #define CONTENT_COMMON_TAB_LOAD_STATS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/time.h"
12
13 namespace content {
14
15 // Holds onto start and stop timestamps for a particular tab.
16 struct TabLoadTime {
jam 2013/04/04 17:28:39 tab is a chrome concept, content doesn't know abou
jeremy 2013/04/07 14:51:54 Renamed tab -> web_contents globally.
17 public:
18 TabLoadTime() {}
19
20 explicit TabLoadTime(base::TimeTicks started)
21 : start_time(started) {
22 }
23
24 ~TabLoadTime() {}
25
26 void set_stop_time(base::TimeTicks stopped) {
27 stop_time = stopped;
28 }
29
30 base::TimeTicks start_time;
31 base::TimeTicks stop_time;
32 };
33
34 // Encodes a TabLoadTime as JSON.
35 // Input:
36 // - |tab_load_time| - data to encode.
37 // - |timer_start| - clock start, output times are recorded as deltas from this
38 // point in time.
39 // - |result| - returned JSON.
40 // Example return value:
41 // {'start_time_ms': 1, 'stop_time_ms': 2.5}
42 // stop_time_ms values may be null if a tab hasn't fully loaded.
43 void ConvertTabLoadTimeToJSON(
jam 2013/04/04 17:28:39 this method is only called in the renderer. why is
jeremy 2013/04/07 14:51:54 Done.
44 const content::TabLoadTime& tab_load_time,
45 const base::TimeTicks& timer_start,
46 std::string *result);
47
48 } // namespace content
49
50 #endif // CONTENT_COMMON_TAB_LOAD_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698