update_engine: Fix all the "using" declaration usage.

This patch removes unused "using" declarations, that is, declarations
included in a .cc file at a global scope such that "using foo::bar"
that later don't use the identifier "bar" at all.

This also unifies the usage of these identifiers in the .cc files
in favor of using the short name defined by the using declaration.
For example, in several cases the .h refer to a type like
"std::string" because using declarations are forbidden in header
files while the .cc includes "using std::string;" with the purpose
of just writting "string" in the .cc file. Very rarely, the full
identifier is used when a local name ocludes it, for example,
StringVectorToGStrv() and StringVectorToString() in utils.cc named
its argument just "vector" need to refer to std::vector with the
full name. This patch renames those arguments instead.

Finally, it also sorts a few lists of using declarations that weren't
in order.

BUG=None
TEST=FEATURES=test emerge-link update_engine

Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840
Reviewed-on: https://chromium-review.googlesource.com/226423
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/download_action.cc b/download_action.cc
index 6871f60..e51549e 100644
--- a/download_action.cc
+++ b/download_action.cc
@@ -18,11 +18,9 @@
 #include "update_engine/subprocess.h"
 #include "update_engine/utils.h"
 
-using std::min;
+using base::FilePath;
 using std::string;
 using std::vector;
-using base::FilePath;
-using base::StringPrintf;
 
 namespace chromeos_update_engine {
 
@@ -50,7 +48,7 @@
   }
 
   if (delete_p2p_file) {
-    base::FilePath path =
+    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();
@@ -74,7 +72,7 @@
 
   // File has already been created (and allocated, xattrs been
   // populated etc.) by FileShare() so just open it for writing.
-  base::FilePath path = p2p_manager->FileGetPath(p2p_file_id_);
+  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();
@@ -202,7 +200,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).
-      base::FilePath path = system_state_->p2p_manager()->FileGetPath(file_id);
+      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();