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

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

Issue 2949993002: Don't ignore manifest icons for sites that don't have a service worker. (Closed)
Patch Set: Comments Created 3 years, 6 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/webapps/add_to_homescreen_manager.cc
diff --git a/chrome/browser/android/webapps/add_to_homescreen_manager.cc b/chrome/browser/android/webapps/add_to_homescreen_manager.cc
index f5e8ecd5d1d356a2a1960bf2153a6acfbfac0b65..9f04c8f8749cd683bb0eefd392eab15db1e7ccf6 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_manager.cc
+++ b/chrome/browser/android/webapps/add_to_homescreen_manager.cc
@@ -31,6 +31,14 @@
using base::android::JavaParamRef;
using base::android::ScopedJavaLocalRef;
+namespace {
+
+// The length of time to allow the add to homescreen data fetcher to run before
+// timing out and generating an icon.
+const int kDataTimeoutInMilliseconds = 4000;
+
+} // namespace
+
jlong InitializeAndStart(JNIEnv* env,
const JavaParamRef<jobject>& obj,
const JavaParamRef<jobject>& java_web_contents) {
@@ -94,7 +102,7 @@ void AddToHomescreenManager::Start(content::WebContents* web_contents) {
ShortcutHelper::GetMinimumHomescreenIconSizeInPx(),
ShortcutHelper::GetIdealSplashImageSizeInPx(),
ShortcutHelper::GetMinimumSplashImageSizeInPx(),
- ShortcutHelper::GetIdealBadgeIconSizeInPx(),
+ ShortcutHelper::GetIdealBadgeIconSizeInPx(), kDataTimeoutInMilliseconds,
check_webapk_compatible, this);
}

Powered by Google App Engine
This is Rietveld 408576698