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

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

Issue 2724723002: [WebAPKs]: Reduce the parameters of ShortcutHelper::AddToLauncherWithSkBitmap() (Closed)
Patch Set: Merge branch 'master' into refactor_shortcut_helper2 Created 3 years, 10 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 | chrome/browser/android/banners/app_banner_manager_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b2a9533d0e6d2cde5cce3171c9ac8b0284e4efd7..c5d1af9d35d8297f6352ba31333a2936f8ef05e8 100644
--- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
+++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -6,7 +6,6 @@
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
-#include "base/guid.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/timer/elapsed_timer.h"
@@ -295,12 +294,8 @@ bool AppBannerInfoBarDelegateAndroid::AcceptWebApp(
AppBannerSettingsHelper::RecordBannerInstallEvent(
web_contents, shortcut_info_->url.spec(), AppBannerSettingsHelper::WEB);
- if (weak_manager_) {
- const std::string& uid = base::GenerateGUID();
- ShortcutHelper::AddToLauncherWithSkBitmap(
- web_contents->GetBrowserContext(), *shortcut_info_, uid,
- *icon_.get(), weak_manager_->FetchWebappSplashScreenImageCallback(uid));
- }
+ ShortcutHelper::AddToLauncherWithSkBitmap(web_contents, *shortcut_info_,
+ *icon_.get());
SendBannerAccepted();
return true;
@@ -354,8 +349,7 @@ bool AppBannerInfoBarDelegateAndroid::AcceptWebApk(
WebApkInstaller::FinishCallback callback =
base::Bind(&AppBannerInfoBarDelegateAndroid::OnWebApkInstallFinished,
weak_ptr_factory_.GetWeakPtr());
- ShortcutHelper::InstallWebApkWithSkBitmap(web_contents->GetBrowserContext(),
- *shortcut_info_,
+ ShortcutHelper::InstallWebApkWithSkBitmap(web_contents, *shortcut_info_,
*icon_.get(), callback);
SendBannerAccepted();
« no previous file with comments | « no previous file | chrome/browser/android/banners/app_banner_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698