Clean up CrxDownloader::Result and CrxDownloader::ProgressCallback
This is a follow up of CL https://crrev.com/c/1136518 where,
CrDownloader/UrlFetcherDownloader migrated from URLFetcher to
SimpleURLLoader.
As part of the migration, it was verified that CrxDownloader::Result
had struct members only used in unit tests: |downloaded_bytes| and
|total_bytes|.
Additionally, the CrxDownloader::ProgressCallback did not use its
|result| parameter.
This CL removes the struct members from CrxDownloader::Result as well
as their use (mocked up anyways) in unittests, and removes the unused
|result| parameter from CrxDownloader::ProgressCallback.
BUG=844972, 871211
Change-Id: I5b36c63784ff2632f71c1e5a0cd44b6e0c7c7f37
Reviewed-on: https://chromium-review.googlesource.com/1190324
Commit-Queue: Antonio Gomes <[email protected]>
Reviewed-by: Joshua Pawlicki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586361}
diff --git a/components/update_client/component.h b/components/update_client/component.h
index bb42d07..64f6d7b 100644
--- a/components/update_client/component.h
+++ b/components/update_client/component.h
@@ -242,11 +242,10 @@
// State overrides.
void DoHandle() override;
- // Called when progress is being made downloading a CRX. The progress may
- // not monotonically increase due to how the CRX downloader switches between
+ // Called when progress is being made downloading a CRX. Can be called
+ // multiple times due to how the CRX downloader switches between
// different downloaders and fallback urls.
- void DownloadProgress(const std::string& id,
- const CrxDownloader::Result& download_result);
+ void DownloadProgress(const std::string& id);
void DownloadComplete(const std::string& id,
const CrxDownloader::Result& download_result);
@@ -266,11 +265,10 @@
// State overrides.
void DoHandle() override;
- // Called when progress is being made downloading a CRX. The progress may
- // not monotonically increase due to how the CRX downloader switches between
+ // Called when progress is being made downloading a CRX. Can be called
+ // multiple times due to how the CRX downloader switches between
// different downloaders and fallback urls.
- void DownloadProgress(const std::string& id,
- const CrxDownloader::Result& download_result);
+ void DownloadProgress(const std::string& id);
void DownloadComplete(const std::string& id,
const CrxDownloader::Result& download_result);