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

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

Issue 2632243004: Don't download identical APKs on update. (Closed)
Patch Set: Nits. 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_installer.cc
diff --git a/chrome/browser/android/webapk/webapk_installer.cc b/chrome/browser/android/webapk/webapk_installer.cc
index 685f190a2b2cb9b72d83385192539017b5eeae31..2d17c84918a80ebbe6e541a35974d4458cc193b5 100644
--- a/chrome/browser/android/webapk/webapk_installer.cc
+++ b/chrome/browser/android/webapk/webapk_installer.cc
@@ -416,6 +416,13 @@ void WebApkInstaller::OnURLFetchComplete(const net::URLFetcher* source) {
}
GURL signed_download_url(response->signed_download_url());
+ // https://crbug.com/680131. The server sends an empty URL if the server does
+ // not have a newer WebAPK to update to.
+ if (task_type_ == UPDATE && signed_download_url.is_empty()) {
+ OnSuccess();
+ return;
+ }
+
if (!signed_download_url.is_valid() || response->package_name().empty()) {
OnFailure();
return;
« no previous file with comments | « chrome/browser/android/webapk/webapk.proto ('k') | chrome/browser/android/webapk/webapk_installer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698