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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java

Issue 2121863002: Separate deferred startup into tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split up everything to the idle handler. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
index bdbc1283a74d6fb14be65213c52a895e375d34d3..8b66730899972828baf2f76040bff6ddfb49a315 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
@@ -18,6 +18,7 @@ public class UmaUtils {
private static long sApplicationStartUptimeMs;
private static boolean sRunningApplicationStart;
+ private static long sForegroundStartTimeMs;
/**
* Record the time at which the activity started. This should be called asap after
@@ -32,6 +33,10 @@ public class UmaUtils {
sApplicationStartUptimeMs = SystemClock.uptimeMillis();
}
+ public static void recordForegroundStartTime() {
+ sForegroundStartTimeMs = SystemClock.uptimeMillis();
+ }
+
/**
* Whether the application is in the early stage since the browser process start. The
* "application start" ends right after the last histogram related to browser startup is
@@ -69,5 +74,10 @@ public class UmaUtils {
return sApplicationStartUptimeMs;
Yaron 2016/07/06 14:27:50 so remove this now?
Peter Wen 2016/07/06 15:21:37 Done.
}
+ public static long getForegroundStartTime() {
+ assert sForegroundStartTimeMs != 0;
+ return sForegroundStartTimeMs;
+ }
+
private static native void nativeRecordMetricsReportingDefaultOptIn(boolean optIn);
}

Powered by Google App Engine
This is Rietveld 408576698