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

Unified Diff: components/html_viewer/stats_collection_controller.cc

Issue 1425263003: Use TimeTicks as much as possible in startup_metric_utils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef thread priority dance out on Mac per lack of support in base Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/html_viewer/stats_collection_controller.cc
diff --git a/components/html_viewer/stats_collection_controller.cc b/components/html_viewer/stats_collection_controller.cc
index 8abc09a7dc33598f7f89e3192bff809381246d3a..965c317e79b36e31eff3a0cb73b6a767ee6a8e06 100644
--- a/components/html_viewer/stats_collection_controller.cc
+++ b/components/html_viewer/stats_collection_controller.cc
@@ -22,7 +22,6 @@ namespace html_viewer {
namespace {
// Initialize the histogram data using the given startup performance times.
-// TODO(msw): Use TimeTicks to avoid system clock changes: crbug.com/521164
void GetStartupPerformanceTimesCallbackImpl(
tracing::StartupPerformanceTimesPtr times) {
base::StatisticsRecorder::Initialize();
@@ -36,22 +35,23 @@ void GetStartupPerformanceTimesCallbackImpl(
// TODO(msw): Determine if this is the first run.
startup_metric_utils::RecordBrowserMainMessageLoopStart(
- base::Time::FromInternalValue(times->browser_message_loop_start_time),
+ base::TimeTicks::FromInternalValue(
+ times->browser_message_loop_start_ticks),
false);
startup_metric_utils::RecordBrowserWindowDisplay(
- base::Time::FromInternalValue(times->browser_window_display_time));
+ base::TimeTicks::FromInternalValue(times->browser_window_display_ticks));
startup_metric_utils::RecordBrowserOpenTabsDelta(
base::TimeDelta::FromInternalValue(times->browser_open_tabs_time_delta));
startup_metric_utils::RecordFirstWebContentsMainFrameLoad(
- base::Time::FromInternalValue(
- times->first_web_contents_main_frame_load_time));
+ base::TimeTicks::FromInternalValue(
+ times->first_web_contents_main_frame_load_ticks));
startup_metric_utils::RecordFirstWebContentsNonEmptyPaint(
- base::Time::FromInternalValue(
- times->first_visually_non_empty_layout_time));
+ base::TimeTicks::FromInternalValue(
+ times->first_visually_non_empty_layout_ticks));
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698