Remove two pointers of delta performer
Test: treehugger
Bug: 176087961
Change-Id: I00fa7b5ba508a31162a986f50034ceeb34becbfd
diff --git a/common/download_action.h b/common/download_action.h
index caa5a7b..7b496b1 100644
--- a/common/download_action.h
+++ b/common/download_action.h
@@ -23,6 +23,7 @@
#include <memory>
#include <string>
+#include <utility>
#include "update_engine/common/action.h"
#include "update_engine/common/boot_control_interface.h"
@@ -87,7 +88,9 @@
std::string Type() const override { return StaticType(); }
// Testing
- void SetTestFileWriter(DeltaPerformer* writer) { writer_ = writer; }
+ void SetTestFileWriter(std::unique_ptr<DeltaPerformer> writer) {
+ delta_performer_ = std::move(writer);
+ }
int GetHTTPResponseCode() { return http_fetcher_->http_response_code(); }
@@ -130,10 +133,6 @@
// update.
bool interactive_;
- // The FileWriter that downloaded data should be written to. It will
- // either point to a writer for unittest or *delta_performer_.
- DeltaPerformer* writer_;
-
std::unique_ptr<DeltaPerformer> delta_performer_;
// Used by TransferTerminated to figure if this action terminated itself or