Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |