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..47a6561bae133283a2a3aab5c9e968cbaffbe8f2 100644 |
--- a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
+++ b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc |
@@ -117,13 +117,17 @@ void AddToHomescreenDialogHelper::AddShortcut(const ShortcutInfo& info, |
return; |
add_shortcut_pending_ = false; |
+ content::WebContents* web_contents = data_fetcher_->web_contents(); |
+ if (!web_contents) |
+ return; |
+ |
RecordAddToHomescreen(); |
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, |
+ web_contents->GetBrowserContext(), info, uid, icon, |
data_fetcher_->FetchSplashScreenImageCallback(uid))); |
} |