Chromium Code Reviews| Index: chrome/browser/android/shortcut_helper.cc |
| diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc |
| index df20d4f1e6df3792e8e1f10c7181124694e7edfd..f4df505f15984e6c19c87275188bca7be50e39c9 100644 |
| --- a/chrome/browser/android/shortcut_helper.cc |
| +++ b/chrome/browser/android/shortcut_helper.cc |
| @@ -13,6 +13,7 @@ |
| #include "base/bind.h" |
| #include "base/callback.h" |
| #include "base/command_line.h" |
|
dominickn
2017/03/01 02:29:39
This command_line.h include can be removed while y
|
| +#include "base/guid.h" |
| #include "base/strings/string16.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/threading/sequenced_worker_pool.h" |
| @@ -132,13 +133,17 @@ void AddShortcutWithSkBitmap(const ShortcutInfo& info, |
| // static |
| void ShortcutHelper::AddToLauncherWithSkBitmap( |
| - content::BrowserContext* browser_context, |
| + content::WebContents* web_contents, |
| const ShortcutInfo& info, |
| - const std::string& webapp_id, |
| - const SkBitmap& icon_bitmap, |
| - const base::Closure& splash_image_callback) { |
| + const SkBitmap& icon_bitmap) { |
| + std::string webapp_id = base::GenerateGUID(); |
| if (info.display == blink::WebDisplayModeStandalone || |
| info.display == blink::WebDisplayModeFullscreen) { |
| + base::Closure splash_image_callback = |
| + base::Bind(&ShortcutHelper::FetchSplashScreenImage, web_contents, |
|
dominickn
2017/03/01 02:29:39
Nit: remove the local and pass the result of base:
|
| + info.splash_image_url, info.ideal_splash_image_size_in_px, |
| + info.minimum_splash_image_size_in_px, webapp_id); |
| + |
| AddWebappWithSkBitmap(info, webapp_id, icon_bitmap, splash_image_callback); |
| return; |
| } |