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

Side by Side Diff: components/html_viewer/stats_collection_observer.h

Issue 1278673002: Add stats collection for telemetry startup.warm.blank_page test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache and reuse a single mojo:tracing connection in mojo:html_viewer. Created 5 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2015 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 COMPONENTS_HTML_VIEWER_STATS_COLLECTION_OBSERVER_H_
6 #define COMPONENTS_HTML_VIEWER_STATS_COLLECTION_OBSERVER_H_
7
8 #include "base/time/time.h"
9 #include "components/html_viewer/html_document.h"
10
11 namespace html_viewer {
12
13 // Collect timing information for page loads.
14 class StatsCollectionObserver : public HTMLDocument::Observer {
15 public:
16 explicit StatsCollectionObserver(HTMLDocument* html_document);
17 ~StatsCollectionObserver() override;
18
19 // HTMLDocument::Observer implementation
20 void DidStartLoading() override;
21 void DidStopLoading() override;
22
23 // Timing for the page load start and stop. These functions may return
24 // a null time value under various circumstances.
25 const base::Time& load_start_time() { return start_time_; }
yzshen1 2015/08/13 15:59:12 Please use the same name for getter and the corres
msw 2015/08/14 23:20:35 Removed.
26 const base::Time& load_stop_time() { return stop_time_; }
27
28 private:
29 base::Time start_time_;
sky 2015/08/12 23:54:36 Shouldn't this use timeticks?
msw 2015/08/14 23:20:35 Removed.
30 base::Time stop_time_;
31
32 DISALLOW_COPY_AND_ASSIGN(StatsCollectionObserver);
33 };
34
35 } // namespace html_viewer
36
37 #endif // COMPONENTS_HTML_VIEWER_STATS_COLLECTION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698