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

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, 11 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 1384c5997f700cfa52b0ab58ec16c26684fcbb19..575f02e98f0588bfdb6e2dc91675b6fa7f30187a 100644
--- a/chrome/browser/android/webapk/webapk_installer.cc
+++ b/chrome/browser/android/webapk/webapk_installer.cc
@@ -418,6 +418,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;

Powered by Google App Engine
This is Rietveld 408576698