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

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

Issue 2138973002: Initial CL for talking to the WebAPK server to generate WebAPK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_builder_impl22_no_content Created 4 years, 4 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/webapk/webapk_installer_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52e454927ee79e5a6aa16039685ed756ecf44db0..a1e7c812cae7a626809b88d7c73452367374ae58 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_dialog_helper.cc
@@ -119,13 +119,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)));
}
« no previous file with comments | « chrome/browser/android/webapk/webapk_installer_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698