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/policy_manager/evaluation_context.h b/policy_manager/evaluation_context.h
index e7b922f..dc7e53f 100644
--- a/policy_manager/evaluation_context.h
+++ b/policy_manager/evaluation_context.h
@@ -10,7 +10,7 @@
 #include <base/callback.h>
 #include <base/memory/ref_counted.h>
 #include <base/memory/weak_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/policy_manager/boxed_value.h"
 #include "update_engine/policy_manager/event_loop.h"
diff --git a/policy_manager/event_loop.h b/policy_manager/event_loop.h
index a8474ba..8a1e59e 100644
--- a/policy_manager/event_loop.h
+++ b/policy_manager/event_loop.h
@@ -12,7 +12,7 @@
 #include <glib.h>
 
 #include <base/callback.h>
-#include <base/time.h>
+#include <base/time/time.h>
 
 namespace chromeos_policy_manager {
 
diff --git a/policy_manager/real_random_provider.cc b/policy_manager/real_random_provider.cc
index 17ab024..4c8ae85 100644
--- a/policy_manager/real_random_provider.cc
+++ b/policy_manager/real_random_provider.cc
@@ -5,9 +5,9 @@
 #include <stdio.h>
 #include <unistd.h>
 
-#include <base/file_path.h>
+#include <base/files/file_path.h>
 #include <base/file_util.h>
-#include <base/stringprintf.h>
+#include <base/strings/stringprintf.h>
 
 #include "update_engine/policy_manager/real_random_provider.h"
 #include "update_engine/policy_manager/variable.h"
@@ -46,8 +46,8 @@
       if (rd == 0 || ferror(fp_.get())) {
         // Either EOF on fp or read failed.
         if (errmsg) {
-          *errmsg = StringPrintf("Error reading from the random device: %s",
-                                 kRandomDevice);
+          *errmsg = base::StringPrintf(
+              "Error reading from the random device: %s", kRandomDevice);
         }
         return NULL;
       }
diff --git a/policy_manager/real_random_provider_unittest.cc b/policy_manager/real_random_provider_unittest.cc
index 39a2a0e..acd4bb0 100644
--- a/policy_manager/real_random_provider_unittest.cc
+++ b/policy_manager/real_random_provider_unittest.cc
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include <base/memory/scoped_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 #include <gtest/gtest.h>
 
 #include "update_engine/policy_manager/pmtest_utils.h"
diff --git a/policy_manager/real_shill_provider.cc b/policy_manager/real_shill_provider.cc
index 48d01e6..90973e4 100644
--- a/policy_manager/real_shill_provider.cc
+++ b/policy_manager/real_shill_provider.cc
@@ -7,7 +7,7 @@
 #include <string>
 
 #include <base/logging.h>
-#include <base/stringprintf.h>
+#include <base/strings/stringprintf.h>
 #include <chromeos/dbus/service_constants.h>
 
 #include "update_engine/policy_manager/generic_variables.h"
@@ -157,7 +157,7 @@
       if (!connector_->GetConnectionType(provider_->default_service_path_,
                                          &conn_type)) {
         if (errmsg)
-          *errmsg = StringPrintf(
+          *errmsg = base::StringPrintf(
               "Could not retrieve type of default connection (%s)",
               provider_->default_service_path_.c_str());
         return NULL;
diff --git a/policy_manager/real_shill_provider.h b/policy_manager/real_shill_provider.h
index 55125bc..f50f2ac 100644
--- a/policy_manager/real_shill_provider.h
+++ b/policy_manager/real_shill_provider.h
@@ -11,7 +11,7 @@
 
 #include <string>
 
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/clock_interface.h"
 #include "update_engine/dbus_wrapper_interface.h"
diff --git a/policy_manager/real_shill_provider_unittest.cc b/policy_manager/real_shill_provider_unittest.cc
index da1477a..494d609 100644
--- a/policy_manager/real_shill_provider_unittest.cc
+++ b/policy_manager/real_shill_provider_unittest.cc
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include <base/memory/scoped_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 #include <chromeos/dbus/service_constants.h>
 #include <glib.h>
 #include <gtest/gtest.h>
diff --git a/policy_manager/real_time_provider.cc b/policy_manager/real_time_provider.cc
index 0c20e2e..d66dd6f 100644
--- a/policy_manager/real_time_provider.cc
+++ b/policy_manager/real_time_provider.cc
@@ -4,7 +4,7 @@
 
 #include "update_engine/policy_manager/real_time_provider.h"
 
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/clock_interface.h"
 
diff --git a/policy_manager/real_time_provider.h b/policy_manager/real_time_provider.h
index 447f435..49d8896 100644
--- a/policy_manager/real_time_provider.h
+++ b/policy_manager/real_time_provider.h
@@ -5,7 +5,7 @@
 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_
 
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/clock_interface.h"
 #include "update_engine/policy_manager/time_provider.h"
diff --git a/policy_manager/real_time_provider_unittest.cc b/policy_manager/real_time_provider_unittest.cc
index 1ac9083..cec2ed6 100644
--- a/policy_manager/real_time_provider_unittest.cc
+++ b/policy_manager/real_time_provider_unittest.cc
@@ -4,7 +4,7 @@
 
 #include <base/logging.h>
 #include <base/memory/scoped_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 #include <gtest/gtest.h>
 
 #include "update_engine/fake_clock.h"
diff --git a/policy_manager/shill_provider.h b/policy_manager/shill_provider.h
index 82405b6..4fbfedd 100644
--- a/policy_manager/shill_provider.h
+++ b/policy_manager/shill_provider.h
@@ -6,7 +6,7 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_SHILL_PROVIDER_H_
 
 #include <base/memory/scoped_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/policy_manager/provider.h"
 #include "update_engine/policy_manager/variable.h"
diff --git a/policy_manager/time_provider.h b/policy_manager/time_provider.h
index d09097b..7b8bbd9 100644
--- a/policy_manager/time_provider.h
+++ b/policy_manager/time_provider.h
@@ -6,7 +6,7 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_TIME_PROVIDER_H_
 
 #include <base/memory/scoped_ptr.h>
-#include <base/time.h>
+#include <base/time/time.h>
 
 #include "update_engine/policy_manager/provider.h"
 #include "update_engine/policy_manager/variable.h"
diff --git a/policy_manager/variable.h b/policy_manager/variable.h
index 8966a9a..eace46e 100644
--- a/policy_manager/variable.h
+++ b/policy_manager/variable.h
@@ -11,7 +11,7 @@
 
 #include <base/bind.h>
 #include <base/logging.h>
-#include <base/time.h>
+#include <base/time/time.h>
 #include <gtest/gtest_prod.h>  // for FRIEND_TEST
 
 #include "update_engine/policy_manager/event_loop.h"