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

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 'start' into refactor_shortcut_helper3 Created 3 years, 9 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 | « chrome/browser/android/webapk/webapk_update_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56142f82639142a3417e8cfeb6e9e664af2ab4fc..be9ab62d528e131e600ba8afc880fa53872edb00 100644
--- a/chrome/browser/android/webapk/webapk_update_manager.cc
+++ b/chrome/browser/android/webapk/webapk_update_manager.cc
@@ -29,22 +29,15 @@ bool WebApkUpdateManager::Register(JNIEnv* env) {
// static
void WebApkUpdateManager::OnBuiltWebApk(const std::string& id,
- bool success,
+ WebApkInstallResult result,
bool relax_updates,
const std::string& webapk_package) {
JNIEnv* env = base::android::AttachCurrentThread();
- if (success) {
- DVLOG(1)
- << "Sent request to update WebAPK to server. Seems to have worked.";
- } else {
- LOG(WARNING) << "Server request to update WebAPK failed.";
- }
-
base::android::ScopedJavaLocalRef<jstring> java_id =
base::android::ConvertUTF8ToJavaString(env, id);
- Java_WebApkUpdateManager_onBuiltWebApk(env, java_id.obj(), success,
- relax_updates);
+ Java_WebApkUpdateManager_onBuiltWebApk(
+ env, java_id.obj(), static_cast<int>(result), relax_updates);
}
// static JNI method.
@@ -118,8 +111,9 @@ static void UpdateAsync(
if (install_service->IsInstallInProgress(info.manifest_url)) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id, false /* success */,
- false /* relax_updates */, "" /* webapk_package */));
+ base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id,
+ WebApkInstallResult::FAILURE, false /* relax_updates */,
+ "" /* webapk_package */));
return;
}
install_service->UpdateAsync(
« no previous file with comments | « chrome/browser/android/webapk/webapk_update_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698