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

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

Issue 2248293002: Do not install WebAPKs with web manifests with invalid URL components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into webapk_installable_checker 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
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 5fbadeef78523aebb7a94f2ca5f8091cdf21392d..447b0a57ee2f2144d18732dc16fbad06a17af986 100644
--- a/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
+++ b/chrome/browser/android/webapk/manifest_upgrade_detector_fetcher.cc
@@ -10,6 +10,7 @@
#include "base/android/jni_string.h"
#include "chrome/browser/android/shortcut_helper.h"
#include "chrome/browser/android/shortcut_info.h"
+#include "chrome/browser/android/webapk/webapk_web_manifest_checker.h"
#include "chrome/browser/installable/installable_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -135,8 +136,10 @@ void ManifestUpgradeDetectorFetcher::OnDidGetInstallableData(
// TODO(pkotwicz): Tell Java side that the Web Manifest was fetched but the
// Web Manifest is not WebAPK-compatible. (http://crbug.com/639536)
- if (!data.is_installable)
+ if (!data.is_installable ||
+ !AreWebManifestUrlsWebApkCompatible(data.manifest)) {
return;
+ }
ShortcutInfo info(GURL::EmptyGURL());
info.UpdateFromManifest(data.manifest);

Powered by Google App Engine
This is Rietveld 408576698