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

Unified Diff: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc

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
Index: chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
index 04b164f664fc31c6ffb272d488f3f07e895041ec..0ad21075ba9ada510de7f309aa2c1b0972765eaf 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -23,7 +23,6 @@
#include "chrome/common/render_messages.h"
#include "chrome/grit/generated_resources.h"
#include "components/rappor/rappor_utils.h"
-#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/manifest.h"
@@ -262,11 +261,9 @@ bool AppBannerInfoBarDelegateAndroid::Accept() {
info.UpdateSource(ShortcutInfo::SOURCE_APP_BANNER);
const std::string& uid = base::GenerateGUID();
- content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE,
- base::Bind(&ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap,
- web_contents->GetBrowserContext(), info, uid, *icon_.get(),
- weak_manager_->FetchWebappSplashScreenImageCallback(uid)));
+ ShortcutHelper::AddToLauncherWithSkBitmap(
+ web_contents->GetBrowserContext(), info, uid, *icon_.get(),
+ weak_manager_->FetchWebappSplashScreenImageCallback(uid));
}
SendBannerAccepted(web_contents, "web");

Powered by Google App Engine
This is Rietveld 408576698