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

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

Issue 2968693003: [Android Webapps] Make AddToHomescreenDataFetcher easier to test (Closed)
Patch Set: Merge branch 'master' into homescreen_fetcher_weak_ptr2 Created 3 years, 5 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 | « chrome/browser/android/webapps/add_to_homescreen_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 03503e7117dd79e2ca819fca4661fd617a953587..5a808995dfb3bf130b459b7a7fff9492c050b915 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_manager.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_manager.cc
@@ -96,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(),
@@ -105,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();
@@ -188,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);
-}
« no previous file with comments | « chrome/browser/android/webapps/add_to_homescreen_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698