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

Unified Diff: chrome/browser/metrics/first_web_contents_profiler.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: chrome/browser/metrics/first_web_contents_profiler.cc
diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc
index 17662e930275ac45ff366197b667195adbc490e0..8626bf40ee96244283fd69842927e3da6db1af9e 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.cc
+++ b/chrome/browser/metrics/first_web_contents_profiler.cc
@@ -56,7 +56,7 @@ void FirstWebContentsProfiler::DidFirstVisuallyNonEmptyPaint() {
}
collected_paint_metric_ = true;
- const base::Time now = base::Time::Now();
+ const base::TimeTicks now = base::TimeTicks::Now();
// Record the old metric unconditionally.
startup_metric_utils::RecordDeprecatedFirstWebContentsNonEmptyPaint(now);
if (!finished_)
@@ -78,7 +78,7 @@ void FirstWebContentsProfiler::DocumentOnLoadCompletedInMainFrame() {
}
collected_load_metric_ = true;
- const base::Time now = base::Time::Now();
+ const base::TimeTicks now = base::TimeTicks::Now();
// Record the old metric unconditionally.
startup_metric_utils::RecordDeprecatedFirstWebContentsMainFrameLoad(now);
if (!finished_)
@@ -102,7 +102,7 @@ void FirstWebContentsProfiler::DidStartNavigation(
collected_main_navigation_start_metric_ = true;
startup_metric_utils::RecordFirstWebContentsMainNavigationStart(
- base::Time::Now());
+ base::TimeTicks::Now());
}
void FirstWebContentsProfiler::DidFinishNavigation(
@@ -138,7 +138,7 @@ void FirstWebContentsProfiler::DidFinishNavigation(
collected_main_navigation_finished_metric_ = true;
startup_metric_utils::RecordFirstWebContentsMainNavigationFinished(
- base::Time::Now());
+ base::TimeTicks::Now());
}
void FirstWebContentsProfiler::WasHidden() {

Powered by Google App Engine
This is Rietveld 408576698