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

Unified Diff: testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java

Issue 2228273002: Run ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap() on Worker thread instead of IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_builder_impl2_thread 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
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java b/testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java
index e542128b8d2d6b6040000826d920b1d687ac0ee7..ae53ee13e493fae415ed875c25e04da192e19b67 100644
--- a/testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java
+++ b/testing/android/junit/java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java
@@ -47,6 +47,16 @@ public class BackgroundShadowAsyncTask<Params, Progress, Result> extends
}
}
+ @Implementation
+ public final Result get() {
+ try {
+ runBackgroundTasks();
+ return BackgroundShadowAsyncTask.super.get();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
public static void runBackgroundTasks() throws Exception {
sExecutorService.submit(new Runnable() {
@Override
@@ -55,4 +65,4 @@ public class BackgroundShadowAsyncTask<Params, Progress, Result> extends
}
}).get();
}
-}
+}
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698