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

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

Issue 2207933002: Reland of Separate deferred startup into tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix one-line. Created 4 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 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..6dad167052a8710a0976162c10d4193cd44ae864 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
@@ -15,9 +15,9 @@ import org.chromium.base.annotations.JNINamespace;
@JNINamespace("chrome::android")
public class UmaUtils {
private static long sApplicationStartWallClockMs;
- 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
@@ -29,7 +29,10 @@ public class UmaUtils {
// then need the start time in the C++ side before we return to Java. As such we
// save it in a static that the C++ can fetch once it has initialized the JNI.
sApplicationStartWallClockMs = System.currentTimeMillis();
- sApplicationStartUptimeMs = SystemClock.uptimeMillis();
+ }
+
+ public static void recordForegroundStartTime() {
+ sForegroundStartTimeMs = SystemClock.uptimeMillis();
}
/**
@@ -65,8 +68,9 @@ public class UmaUtils {
return sApplicationStartWallClockMs;
}
- public static long getMainEntryPointTime() {
- return sApplicationStartUptimeMs;
+ 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