Index: chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
diff --git a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
index ba6732f42240274e61db5447ba35c5c9549c86bc..6b90143ee4e3d1042d59bbb333fb5cade68871d4 100644 |
--- a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
+++ b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
@@ -39,12 +39,14 @@ AddToHomescreenDialogHelper::AddToHomescreenDialogHelper( |
jobject obj, |
content::WebContents* web_contents) |
: add_shortcut_pending_(false), |
- data_fetcher_(new AddToHomescreenDataFetcher(web_contents, |
+ data_fetcher_(new AddToHomescreenDataFetcher( |
+ web_contents, |
ShortcutHelper::GetIdealHomescreenIconSizeInDp(), |
ShortcutHelper::GetMinimumHomescreenIconSizeInDp(), |
ShortcutHelper::GetIdealSplashImageSizeInDp(), |
ShortcutHelper::GetMinimumSplashImageSizeInDp(), |
- this)) { |
+ this)), |
+ browser_context_(web_contents->GetBrowserContext()) { |
java_ref_.Reset(env, obj); |
} |
@@ -122,8 +124,8 @@ void AddToHomescreenDialogHelper::AddShortcut(const ShortcutInfo& info, |
const std::string& uid = base::GenerateGUID(); |
content::BrowserThread::PostTask( |
content::BrowserThread::IO, FROM_HERE, |
- base::Bind(&ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap, info, |
- uid, icon, |
+ base::Bind(&ShortcutHelper::AddToLauncherInBackgroundWithSkBitmap, |
+ browser_context_, info, uid, icon, |
data_fetcher_->FetchSplashScreenImageCallback(uid))); |
} |