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

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

Issue 2349263003: Do not create WebAPK via add-to-homescreen menu item if manifest is not WebAPK-compatible (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
index 7d107a22b8624ec026336548246b366c197c2d87..5f44742346e5c8d5997cd6b3bb962ca3ed151a81 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
@@ -12,6 +12,7 @@
#include "base/strings/string16.h"
#include "chrome/browser/android/offline_pages/offline_page_utils.h"
#include "chrome/browser/android/shortcut_helper.h"
+#include "chrome/browser/android/webapk/webapk_web_manifest_checker.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/installable/installable_manager.h"
#include "chrome/browser/manifest/manifest_icon_selector.h"
@@ -205,8 +206,12 @@ void AddToHomescreenDataFetcher::OnDidPerformInstallableCheck(
is_installable_check_complete_ = true;
- if (check_webapk_compatibility_)
- weak_observer_->OnDidDetermineWebApkCompatibility(data.is_installable);
+ if (check_webapk_compatibility_) {
+ bool webapk_compatible =
+ (data.error_code == NO_ERROR_DETECTED &&
+ AreWebManifestUrlsWebApkCompatible(data.manifest));
+ weak_observer_->OnDidDetermineWebApkCompatibility(webapk_compatible);
+ }
if (!data.manifest.IsEmpty()) {
content::RecordAction(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698