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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc

Issue 2218413002: Calls ShortcutHelper::FinalizeLauncherIcon() on worker thread instead of on IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser/android/webapps/add_to_homescreen_dialog_helper.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
index a1e7c812cae7a626809b88d7c73452367374ae58..9c3a8f99e5c31483c0ed375f239e4d72479689af 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
@@ -85,13 +85,14 @@ void AddToHomescreenDialogHelper::Destroy(JNIEnv* env,
delete this;
}
-SkBitmap AddToHomescreenDialogHelper::FinalizeLauncherIcon(
+SkBitmap AddToHomescreenDialogHelper::FinalizeLauncherIconInBackground(
const SkBitmap& bitmap,
dominickn 2016/08/08 03:13:42 Nit: I think this indentation is wrong, you may as
const GURL& url,
bool* is_generated) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+ DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- return ShortcutHelper::FinalizeLauncherIcon(bitmap, url, is_generated);
+ return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url,
+ is_generated);
}
void AddToHomescreenDialogHelper::AddShortcut(

Powered by Google App Engine
This is Rietveld 408576698