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

Unified Diff: chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc

Issue 2262583002: Do not request upgrade if Web Manifest is no longer WebAPK-capable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/manifest_upgrade_detector_fetcher.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/webapk/manifest_upgrade_detector_fetcher.cc
diff --git a/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc b/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
index f67ec2de0dd66de204c78e21607008e1e447e93e..e76df48f08cb74a7ea739ad7a7e63528877ca70e 100644
--- a/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
+++ b/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
@@ -109,6 +109,7 @@ void ManifestUpgradeDetectorFetcher::DidFinishLoad(
ShortcutHelper::GetIdealHomescreenIconSizeInDp();
params.minimum_icon_size_in_dp =
ShortcutHelper::GetMinimumHomescreenIconSizeInDp();
+ params.check_installable = true;
params.fetch_valid_icon = true;
InstallableManager::CreateForWebContents(web_contents());
InstallableManager* installable_manager =
@@ -136,10 +137,12 @@ void ManifestUpgradeDetectorFetcher::OnDidGetInstallableData(
info.UpdateFromManifest(data.manifest);
info.manifest_url = data.manifest_url;
info.icon_url = data.icon_url;
- OnDataAvailable(info, (data.icon ? *data.icon : SkBitmap()));
+ OnDataAvailable(data.is_installable, info,
+ (data.icon ? *data.icon : SkBitmap()));
}
void ManifestUpgradeDetectorFetcher::OnDataAvailable(
+ bool is_installable,
Yaron 2016/08/19 13:57:10 if it's not installable, we're going to do a bunch
Xi Han 2016/08/23 19:11:52 Yaron's suggestion makes sense, even though I didn
const ShortcutInfo& info,
const SkBitmap& icon_bitmap) {
JNIEnv* env = base::android::AttachCurrentThread();
@@ -164,7 +167,7 @@ void ManifestUpgradeDetectorFetcher::OnDataAvailable(
}
Java_ManifestUpgradeDetectorFetcher_onDataAvailable(
- env, java_ref_, java_url, java_scope, java_name, java_short_name,
- java_icon_url, icon_murmur2_hash, java_bitmap, info.display,
- info.orientation, info.theme_color, info.background_color);
+ env, java_ref_, is_installable, java_url, java_scope, java_name,
+ java_short_name, java_icon_url, icon_murmur2_hash, java_bitmap,
+ info.display, info.orientation, info.theme_color, info.background_color);
}
« no previous file with comments | « chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698