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

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

Issue 2657673002: Android: Guard against multiple stat uploads (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
index d8c547117389f483f1c1415bdb133b9121cbeb96..c92e632ae6cea401f212dad43aa430ca91069d1e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
@@ -106,7 +106,7 @@ public class DeferredStartupHandler {
public boolean queueIdle() {
Runnable currentTask = mDeferredTasks.poll();
if (currentTask == null) {
- if (mDeferredStartupInitializedForApp) {
+ if (mDeferredStartupInitializedForApp && !mDeferredStartupCompletedForApp) {
mDeferredStartupCompletedForApp = true;
recordDeferredStartupStats();
}
@@ -137,7 +137,6 @@ public class DeferredStartupHandler {
"UMA.Debug.EnableCrashUpload.DeferredStartUpCompleteTime",
SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime(),
TimeUnit.MILLISECONDS);
- LocaleManager.getInstance().recordStartupMetrics();
}
/**
@@ -219,6 +218,13 @@ public class DeferredStartupHandler {
}
});
+ mDeferredTasks.add(new Runnable() {
+ @Override
+ public void run() {
+ LocaleManager.getInstance().recordStartupMetrics();
+ }
+ });
+
final ChromeApplication application = (ChromeApplication) mAppContext;
mDeferredTasks.add(new Runnable() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698