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.
Change-Id: Ie9d07dda2d773312e55be3c0ab7c9e5b737be18b
diff --git a/common/test_utils.h b/common/test_utils.h
index 363801f..ba9f5f2 100644
--- a/common/test_utils.h
+++ b/common/test_utils.h
@@ -165,7 +165,7 @@
unlinker_.reset(new ScopedPathUnlinker(path_));
}
- const std::string& path() { return path_; }
+ const std::string& path() const { return path_; }
private:
std::string path_;