Fix download progress offset error

Download progress might exceed 100% as download_action took the offset
of payload as part of progress. Correct this error by subtracting the
base_offset.

Test: th
Bug: 315255778
Change-Id: I82437a95bec2c1391c7dda99f80a68ec3cba8e13
diff --git a/download_action.cc b/download_action.cc
index 615eb66..566fad9 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -219,7 +219,8 @@
   uint64_t bytes_downloaded_total =
       bytes_received_previous_payloads_ + bytes_received_;
   if (delegate_ && download_active_) {
-    delegate_->BytesReceived(length, bytes_downloaded_total, bytes_total_);
+    delegate_->BytesReceived(
+        length, bytes_downloaded_total - base_offset_, bytes_total_);
   }
   if (delta_performer_ && !delta_performer_->Write(bytes, length, &code_)) {
     if (code_ != ErrorCode::kSuccess) {