update_engine: update to libbase 242728
Made update_engine link with libchrome-242728 and fixed compile
issues due to changes in namespaces and include file layout.
Also removed some of suppressed compiler warnings and fixed the
issues masked by them (e.g. mismatched printf-like specifiers).
Added -Wextra compiler option to enable additional useful warnings
to ensure more strict checking... Had to disable "unused-parameter"
though since we have a lot of functions (mainly in fakes) that do
not use all of their parameters.
BUG=chromium:351593
TEST=Unit tests passed.
CQ-DEPEND=CL:191721
Change-Id: I1aa63a48d5f1f4ea75ba6b00aec7aa5f3bad15c4
Reviewed-on: https://chromium-review.googlesource.com/191510
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/update_attempter.cc b/update_attempter.cc
index 40c7e29..d5c2d98 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -12,7 +12,7 @@
#include <base/file_util.h>
#include <base/logging.h>
#include <base/rand_util.h>
-#include <base/stringprintf.h>
+#include <base/strings/stringprintf.h>
#include <chromeos/dbus/service_constants.h>
#include <glib.h>
@@ -854,7 +854,7 @@
return;
int64_t value = system_state_->clock()->GetBootTime().ToInternalValue();
- string contents = StringPrintf("%" PRIi64, value);
+ string contents = base::StringPrintf("%" PRIi64, value);
utils::WriteFile(update_completed_marker_.c_str(),
contents.c_str(),
@@ -1072,8 +1072,7 @@
// after resetting to idle state, it doesn't go back to
// UPDATE_STATUS_UPDATED_NEED_REBOOT state.
if (!update_completed_marker_.empty()) {
- const FilePath update_completed_marker_path(update_completed_marker_);
- if (!file_util::Delete(update_completed_marker_path, false))
+ if (!base::DeleteFile(base::FilePath(update_completed_marker_), false))
ret_value = false;
}