Merge "Add a GetMappedPackageLength to Updater"

This commit is contained in:
Treehugger Robot
2019-07-08 23:12:38 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -44,4 +44,5 @@ class UpdaterInterface {
virtual ZipArchiveHandle GetPackageHandle() const = 0;
virtual std::string GetResult() const = 0;
virtual uint8_t* GetMappedPackageAddress() const = 0;
virtual size_t GetMappedPackageLength() const = 0;
};

View File

@@ -62,10 +62,12 @@ class Updater : public UpdaterInterface {
std::string GetResult() const override {
return result_;
}
uint8_t* GetMappedPackageAddress() const override {
return mapped_package_.addr;
}
size_t GetMappedPackageLength() const override {
return mapped_package_.length;
}
private:
friend class UpdaterTestBase;