| Index: chrome/browser/android/webapps/add_to_homescreen_manager.cc
|
| diff --git a/chrome/browser/android/webapps/add_to_homescreen_manager.cc b/chrome/browser/android/webapps/add_to_homescreen_manager.cc
|
| index 17be74754228df42db24c3813bb941a51c9fa773..5a808995dfb3bf130b459b7a7fff9492c050b915 100644
|
| --- a/chrome/browser/android/webapps/add_to_homescreen_manager.cc
|
| +++ b/chrome/browser/android/webapps/add_to_homescreen_manager.cc
|
| @@ -74,8 +74,7 @@ void AddToHomescreenManager::AddShortcut(
|
|
|
| base::string16 user_title =
|
| base::android::ConvertJavaStringToUTF16(env, j_user_title);
|
| - if (!user_title.empty())
|
| - data_fetcher_->shortcut_info().user_title = user_title;
|
| + data_fetcher_->shortcut_info().user_title = user_title;
|
|
|
| RecordAddToHomescreen();
|
| ShortcutHelper::AddToLauncherWithSkBitmap(web_contents,
|
| @@ -97,7 +96,7 @@ void AddToHomescreenManager::Start(content::WebContents* web_contents) {
|
| ShowDialog();
|
| }
|
|
|
| - data_fetcher_ = new AddToHomescreenDataFetcher(
|
| + data_fetcher_ = base::MakeUnique<AddToHomescreenDataFetcher>(
|
| web_contents, ShortcutHelper::GetIdealHomescreenIconSizeInPx(),
|
| ShortcutHelper::GetMinimumHomescreenIconSizeInPx(),
|
| ShortcutHelper::GetIdealSplashImageSizeInPx(),
|
| @@ -106,12 +105,7 @@ void AddToHomescreenManager::Start(content::WebContents* web_contents) {
|
| check_webapk_compatible, this);
|
| }
|
|
|
| -AddToHomescreenManager::~AddToHomescreenManager() {
|
| - if (data_fetcher_) {
|
| - data_fetcher_->set_weak_observer(nullptr);
|
| - data_fetcher_ = nullptr;
|
| - }
|
| -}
|
| +AddToHomescreenManager::~AddToHomescreenManager() {}
|
|
|
| void AddToHomescreenManager::ShowDialog() {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| @@ -189,13 +183,3 @@ void AddToHomescreenManager::CreateInfoBarForWebApk(
|
| -1 /* event_request_id */, true /* is_webapk */,
|
| webapk::INSTALL_SOURCE_MENU);
|
| }
|
| -
|
| -SkBitmap AddToHomescreenManager::FinalizeLauncherIconInBackground(
|
| - const SkBitmap& bitmap,
|
| - const GURL& url,
|
| - bool* is_generated) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| -
|
| - return ShortcutHelper::FinalizeLauncherIconInBackground(bitmap, url,
|
| - is_generated);
|
| -}
|
|
|