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/download_action.cc b/download_action.cc
index ab33491..8508670 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -9,8 +9,8 @@
 #include <vector>
 #include <glib.h>
 
-#include <base/file_path.h>
-#include <base/stringprintf.h>
+#include <base/files/file_path.h>
+#include <base/strings/stringprintf.h>
 
 #include "update_engine/action_pipe.h"
 #include "update_engine/p2p_manager.h"
@@ -49,7 +49,8 @@
   }
 
   if (delete_p2p_file) {
-    FilePath path = system_state_->p2p_manager()->FileGetPath(p2p_file_id_);
+    base::FilePath path =
+      system_state_->p2p_manager()->FileGetPath(p2p_file_id_);
     if (unlink(path.value().c_str()) != 0) {
       PLOG(ERROR) << "Error deleting p2p file " << path.value();
     } else {
@@ -72,7 +73,7 @@
 
   // File has already been created (and allocated, xattrs been
   // populated etc.) by FileShare() so just open it for writing.
-  FilePath path = p2p_manager->FileGetPath(p2p_file_id_);
+  base::FilePath path = p2p_manager->FileGetPath(p2p_file_id_);
   p2p_sharing_fd_ = open(path.value().c_str(), O_WRONLY);
   if (p2p_sharing_fd_ == -1) {
     PLOG(ERROR) << "Error opening file " << path.value();
@@ -200,7 +201,7 @@
       // hash. If this is the case, we NEED to clean it up otherwise
       // we're essentially timing out other peers downloading from us
       // (since we're never going to complete the file).
-      FilePath path = system_state_->p2p_manager()->FileGetPath(file_id);
+      base::FilePath path = system_state_->p2p_manager()->FileGetPath(file_id);
       if (!path.empty()) {
         if (unlink(path.value().c_str()) != 0) {
           PLOG(ERROR) << "Error deleting p2p file " << path.value();