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

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

Issue 2733543002: [Android:WebAPK] Don't add webapp to homescreen if WebAPK install times out part 1/3 (Closed)
Patch Set: Merge branch 'refactor_shortcut_helper29' into refactor_shortcut_helper3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapk/webapk_update_manager.cc
diff --git a/chrome/browser/android/webapk/webapk_update_manager.cc b/chrome/browser/android/webapk/webapk_update_manager.cc
index 235dab3f0e8b2eb842b52493e64f3fb4ae8bcd84..7c690c739a01c0ceffb9a3a2ff0be6ff6b872399 100644
--- a/chrome/browser/android/webapk/webapk_update_manager.cc
+++ b/chrome/browser/android/webapk/webapk_update_manager.cc
@@ -29,10 +29,11 @@ bool WebApkUpdateManager::Register(JNIEnv* env) {
// static
void WebApkUpdateManager::OnBuiltWebApk(const std::string& id,
- bool success,
+ WebApkInstallResult result,
const std::string& webapk_package) {
JNIEnv* env = base::android::AttachCurrentThread();
+ bool success = (result == WebApkInstallResult::INSTALLED);
dominickn 2017/03/05 23:52:40 Can we get rid of the logging here now? That make
pkotwicz 2017/03/12 21:11:48 Done.
if (success) {
DVLOG(1)
<< "Sent request to update WebAPK to server. Seems to have worked.";
@@ -115,8 +116,8 @@ static void UpdateAsync(
WebApkInstallService* install_service = WebApkInstallService::Get(profile);
if (install_service->IsInstallInProgress(info.manifest_url)) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE,
- base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id, false, ""));
+ FROM_HERE, base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id,
+ WebApkInstallResult::INSTALL_FAILED, ""));
dominickn 2017/03/05 23:52:40 Is it worth having a separate result case here to
pkotwicz 2017/03/12 21:11:48 I don't think so. An update being already in progr
return;
}
install_service->UpdateAsync(

Powered by Google App Engine
This is Rietveld 408576698