Fetch local files asynchronously.
This patch implements a new fetcher that only handles local files.
While libcurl supports file:// urls, the stream can't be suspended when
accessing local files.
This new FileFetcher is based on the brillo::FileStream class which
properly handles the asynchronous reads from regular files.
Bug: 28866512
TEST=Added unittest. Deployed an update from a file:// URL.
(cherry picked from commit 2c131bbf81d8c02ade163b939c96e44aa93765e9)
Change-Id: I9949a0f214de992c2fd86c1d73aca1c1792f0de0
diff --git a/update_attempter_android.h b/update_attempter_android.h
index 4fdac2c..f6f45f6 100644
--- a/update_attempter_android.h
+++ b/update_attempter_android.h
@@ -108,8 +108,8 @@
void SetStatusAndNotify(UpdateStatus status);
// Helper method to construct the sequence of actions to be performed for
- // applying an update.
- void BuildUpdateActions();
+ // applying an update from the given |url|.
+ void BuildUpdateActions(const std::string& url);
// Sets up the download parameters based on the update requested on the
// |install_plan_|.