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

Unified Diff: chrome/browser/android/shortcut_helper.cc

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
Index: chrome/browser/android/shortcut_helper.cc
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index 6c85072f38c834ef6ca36d814e37654d94ec76c1..e52f96ec34b5178272419523e5df9895b9093365 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -128,20 +128,20 @@ void ShortcutHelper::FetchSplashScreenImage(
const GURL& image_url,
const int ideal_splash_image_size_in_dp,
const int minimum_splash_image_size_in_dp,
- const std::string& webapp_id) {
+ const std::string& webapp_id,
+ const std::string& webapp_scope) {
// This is a fire and forget task. It is not vital for the splash screen image
// to be downloaded so if the downloader returns false there is no fallback.
ManifestIconDownloader::Download(
- web_contents,
- image_url,
- ideal_splash_image_size_in_dp,
+ web_contents, image_url, ideal_splash_image_size_in_dp,
minimum_splash_image_size_in_dp,
- base::Bind(&ShortcutHelper::StoreWebappData, webapp_id));
+ base::Bind(&ShortcutHelper::StoreWebappData, webapp_id, webapp_scope));
}
// static
void ShortcutHelper::StoreWebappData(
const std::string& webapp_id,
+ const std::string& webapp_url,
const SkBitmap& splash_image) {
if (splash_image.drawsNothing())
return;
@@ -149,6 +149,8 @@ void ShortcutHelper::StoreWebappData(
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jstring> java_webapp_id =
base::android::ConvertUTF8ToJavaString(env, webapp_id);
+ ScopedJavaLocalRef<jstring> java_webapp_url =
+ base::android::ConvertUTF8ToJavaString(env, webapp_url);
ScopedJavaLocalRef<jobject> java_splash_image =
gfx::ConvertToJavaBitmap(&splash_image);
@@ -156,6 +158,7 @@ void ShortcutHelper::StoreWebappData(
env,
base::android::GetApplicationContext(),
java_webapp_id.obj(),
+ java_webapp_url.obj(),
java_splash_image.obj());
}
« no previous file with comments | « chrome/browser/android/shortcut_helper.h ('k') | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698