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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager_android.cc

Issue 2675803004: Fall back to shortcut A2HS when Phonesky is out of date or unavailable. (Closed)
Patch Set: Rebase. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/banners/app_banner_manager_android.h" 5 #include "chrome/browser/android/banners/app_banner_manager_android.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 manifest_.related_applications.size()) { 165 manifest_.related_applications.size()) {
166 for (const auto& application : manifest_.related_applications) { 166 for (const auto& application : manifest_.related_applications) {
167 std::string platform = base::UTF16ToUTF8(application.platform.string()); 167 std::string platform = base::UTF16ToUTF8(application.platform.string());
168 std::string id = base::UTF16ToUTF8(application.id.string()); 168 std::string id = base::UTF16ToUTF8(application.id.string());
169 if (CanHandleNonWebApp(platform, application.url, id)) 169 if (CanHandleNonWebApp(platform, application.url, id))
170 return; 170 return;
171 } 171 }
172 Stop(); 172 Stop();
173 } 173 }
174 174
175 if (ChromeWebApkHost::AreWebApkEnabled()) { 175 if (ChromeWebApkHost::CanInstallWebApk()) {
176 if (!AreWebManifestUrlsWebApkCompatible(manifest_)) { 176 if (!AreWebManifestUrlsWebApkCompatible(manifest_)) {
177 ReportStatus(web_contents(), URL_NOT_SUPPORTED_FOR_WEBAPK); 177 ReportStatus(web_contents(), URL_NOT_SUPPORTED_FOR_WEBAPK);
178 Stop(); 178 Stop();
179 return; 179 return;
180 } 180 }
181 } 181 }
182 182
183 // No native app banner was requested. Continue checking for a web app banner. 183 // No native app banner was requested. Continue checking for a web app banner.
184 AppBannerManager::PerformInstallableCheck(); 184 AppBannerManager::PerformInstallableCheck();
185 } 185 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 // static 336 // static
337 void SetTotalEngagementToTrigger(JNIEnv* env, 337 void SetTotalEngagementToTrigger(JNIEnv* env,
338 const JavaParamRef<jclass>& clazz, 338 const JavaParamRef<jclass>& clazz,
339 jdouble engagement) { 339 jdouble engagement) {
340 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); 340 AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement);
341 } 341 }
342 342
343 } // namespace banners 343 } // namespace banners
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698