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/delta_performer.cc b/delta_performer.cc
index ba8a1bf..89c319d 100644
--- a/delta_performer.cc
+++ b/delta_performer.cc
@@ -14,8 +14,9 @@
 
 #include <base/file_util.h>
 #include <base/memory/scoped_ptr.h>
-#include <base/string_util.h>
-#include <base/stringprintf.h>
+#include <base/strings/string_util.h>
+#include <base/strings/stringprintf.h>
+#include <base/format_macros.h>
 #include <google/protobuf/repeated_field.h>
 
 #include "update_engine/bzip_extent_writer.h"
@@ -87,10 +88,10 @@
   string total_operations_str("?");
   string completed_percentage_str("");
   if (num_total_operations_) {
-    total_operations_str = StringPrintf("%zu", num_total_operations_);
+    total_operations_str = base::StringPrintf("%zu", num_total_operations_);
     // Upcasting to 64-bit to avoid overflow, back to size_t for formatting.
     completed_percentage_str =
-        StringPrintf(" (%llu%%)",
+        base::StringPrintf(" (%" PRIu64 "%%)",
                      IntRatio(next_operation_num_, num_total_operations_,
                               100));
   }
@@ -100,10 +101,10 @@
   string payload_size_str("?");
   string downloaded_percentage_str("");
   if (payload_size) {
-    payload_size_str = StringPrintf("%zu", payload_size);
+    payload_size_str = base::StringPrintf("%zu", payload_size);
     // Upcasting to 64-bit to avoid overflow, back to size_t for formatting.
     downloaded_percentage_str =
-        StringPrintf(" (%llu%%)",
+        base::StringPrintf(" (%" PRIu64 "%%)",
                      IntRatio(total_bytes_received_, payload_size, 100));
   }
 
@@ -712,7 +713,7 @@
       start = -1;
     else
       start *= block_size;
-    ret += StringPrintf("%" PRIi64 ":%" PRIu64 ",", start, this_length);
+    ret += base::StringPrintf("%" PRIi64 ":%" PRIu64 ",", start, this_length);
     length += this_length;
   }
   TEST_AND_RETURN_FALSE(length == full_length);
@@ -758,7 +759,7 @@
   DiscardBuffer(true);
 
   int fd = is_kernel_partition ? kernel_fd_ : fd_;
-  const string path = StringPrintf("/proc/self/fd/%d", fd);
+  const string path = base::StringPrintf("/proc/self/fd/%d", fd);
 
   // If this is a non-idempotent operation, request a delayed exit and clear the
   // update state in case the operation gets interrupted. Do this as late as