[update_engine] Update to use not-hideously-old logging API from chrome

BUG=None
TEST=compile

Change-Id: Ieed8952b6806a72b59e16c1579f7293b6a98157a

Review URL: http://codereview.chromium.org/3170010
diff --git a/action.h b/action.h
index 7ce9f60..104ef9e 100644
--- a/action.h
+++ b/action.h
@@ -9,7 +9,7 @@
 #include <tr1/memory>
 #include <iostream>
 #include "base/basictypes.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/action_processor.h"
 #include "update_engine/action_pipe.h"
 
diff --git a/action_pipe.h b/action_pipe.h
index 4681627..a59c210 100644
--- a/action_pipe.h
+++ b/action_pipe.h
@@ -11,7 +11,7 @@
 #include <string>
 #include <tr1/memory>
 #include "base/basictypes.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 // The structure of these classes (Action, ActionPipe, ActionProcessor, etc.)
 // is based on the KSAction* classes from the Google Update Engine code at
diff --git a/cycle_breaker_unittest.cc b/cycle_breaker_unittest.cc
index 59d6825..d06fe81 100644
--- a/cycle_breaker_unittest.cc
+++ b/cycle_breaker_unittest.cc
@@ -7,7 +7,7 @@
 #include <utility>
 #include <vector>
 #include <gtest/gtest.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/cycle_breaker.h"
 #include "update_engine/graph_types.h"
 #include "update_engine/utils.h"
diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc
index 657bdf5..48730a8 100644
--- a/delta_diff_generator.cc
+++ b/delta_diff_generator.cc
@@ -13,7 +13,7 @@
 #include <utility>
 #include <vector>
 #include <bzlib.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/bzip.h"
 #include "update_engine/cycle_breaker.h"
 #include "update_engine/extent_mapper.h"
@@ -652,7 +652,7 @@
 
     // delete the old edge
     CHECK_EQ(1, (*graph)[it->first].out_edges.erase(it->second));
-    
+
     // Add an edge from dst to copy operation
     (*graph)[it->second].out_edges.insert(make_pair(graph->size() - 1,
                                                     EdgeProperties()));
@@ -692,7 +692,7 @@
       (*graph)[blocks[i].writer].out_edges.insert(
           make_pair(blocks[i].reader, EdgeProperties()));
       edge_it = (*graph)[blocks[i].writer].out_edges.find(blocks[i].reader);
-      CHECK_NE(edge_it, (*graph)[blocks[i].writer].out_edges.end());
+      CHECK(edge_it != (*graph)[blocks[i].writer].out_edges.end());
     }
     graph_utils::AppendBlockToExtents(&edge_it->second.extents, i);
   }
@@ -705,7 +705,7 @@
   int in_fd = open(data_blobs_path.c_str(), O_RDONLY, 0);
   TEST_AND_RETURN_FALSE_ERRNO(in_fd >= 0);
   ScopedFdCloser in_fd_closer(&in_fd);
-  
+
   DirectFileWriter writer;
   TEST_AND_RETURN_FALSE(
       writer.Open(new_data_blobs_path.c_str(),
@@ -713,7 +713,7 @@
                   0644) == 0);
   ScopedFileWriterCloser writer_closer(&writer);
   uint64_t out_file_size = 0;
-  
+
   for (int i = 0; i < (manifest->install_operations_size() +
                        manifest->kernel_install_operations_size()); i++) {
     DeltaArchiveManifest_InstallOperation* op = NULL;
diff --git a/delta_diff_generator_unittest.cc b/delta_diff_generator_unittest.cc
index b137766..11f7735 100644
--- a/delta_diff_generator_unittest.cc
+++ b/delta_diff_generator_unittest.cc
@@ -11,7 +11,7 @@
 #include <utility>
 #include <vector>
 #include <gtest/gtest.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/cycle_breaker.h"
 #include "update_engine/delta_diff_generator.h"
 #include "update_engine/delta_performer.h"
diff --git a/extent_writer.h b/extent_writer.h
index ac36364..5eda364 100644
--- a/extent_writer.h
+++ b/extent_writer.h
@@ -6,7 +6,7 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_EXTENT_WRITER_H__
 
 #include <vector>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/update_metadata.pb.h"
 #include "update_engine/utils.h"
 
diff --git a/file_writer.h b/file_writer.h
index ebb8535..1a0cc23 100644
--- a/file_writer.h
+++ b/file_writer.h
@@ -9,7 +9,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/utils.h"
 
 // FileWriter is a class that is used to (synchronously, for now) write to
diff --git a/filesystem_iterator.cc b/filesystem_iterator.cc
index 9d98dea..af5f209 100644
--- a/filesystem_iterator.cc
+++ b/filesystem_iterator.cc
@@ -9,7 +9,7 @@
 #include <set>
 #include <string>
 #include <vector>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/utils.h"
 
 using std::set;
diff --git a/generate_delta_main.cc b/generate_delta_main.cc
index 32b3923..7e18252 100644
--- a/generate_delta_main.cc
+++ b/generate_delta_main.cc
@@ -13,7 +13,7 @@
 #include <gflags/gflags.h>
 #include <glib.h>
 #include "base/command_line.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/delta_diff_generator.h"
 #include "update_engine/delta_performer.h"
 #include "update_engine/subprocess.h"
diff --git a/gzip.cc b/gzip.cc
index 5fbd043..0850b3e 100644
--- a/gzip.cc
+++ b/gzip.cc
@@ -6,7 +6,7 @@
 #include <stdlib.h>
 #include <algorithm>
 #include <zlib.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/utils.h"
 
 using std::max;
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index 0a38c5c..2b2e2cb 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -8,7 +8,7 @@
 #include <base/scoped_ptr.h>
 #include <glib.h>
 #include <gtest/gtest.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/libcurl_http_fetcher.h"
 #include "update_engine/mock_http_fetcher.h"
 
diff --git a/install_plan.h b/install_plan.h
index 9fc6ead..19fee8a 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -6,7 +6,7 @@
 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_INSTALL_PLAN_H__
 
 #include <string>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 // InstallPlan is a simple struct that contains relevant info for many
 // parts of the update system about the install that should happen.
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index 3ae5fbf..7bee4c1 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -4,7 +4,7 @@
 
 #include "update_engine/libcurl_http_fetcher.h"
 #include <algorithm>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 using std::max;
 using std::make_pair;
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index b0cac28..66c1117 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -10,7 +10,7 @@
 #include <curl/curl.h>
 #include <glib.h>
 #include "base/basictypes.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/http_fetcher.h"
 
 // This is a concrete implementation of HttpFetcher that uses libcurl to do the
diff --git a/main.cc b/main.cc
index 8165c14..c196ed5 100644
--- a/main.cc
+++ b/main.cc
@@ -10,7 +10,7 @@
 #include <glib.h>
 
 #include "base/command_line.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "metrics/metrics_library.h"
 #include "update_engine/dbus_constants.h"
 #include "update_engine/dbus_service.h"
diff --git a/mock_http_fetcher.cc b/mock_http_fetcher.cc
index abeff7a..04ec7f6 100644
--- a/mock_http_fetcher.cc
+++ b/mock_http_fetcher.cc
@@ -4,7 +4,7 @@
 
 #include "update_engine/mock_http_fetcher.h"
 #include <algorithm>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 // This is a mac implementation of HttpFetcher which is useful for testing.
 
diff --git a/mock_http_fetcher.h b/mock_http_fetcher.h
index 5b9f898..87cbe99 100644
--- a/mock_http_fetcher.h
+++ b/mock_http_fetcher.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 #include <glib.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/http_fetcher.h"
 
 // This is a mock implementation of HttpFetcher which is useful for testing.
diff --git a/omaha_hash_calculator.cc b/omaha_hash_calculator.cc
index 93b3d9e..7f62622 100644
--- a/omaha_hash_calculator.cc
+++ b/omaha_hash_calculator.cc
@@ -5,7 +5,7 @@
 #include <openssl/bio.h>
 #include <openssl/buffer.h>
 #include <openssl/evp.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/omaha_hash_calculator.h"
 
 namespace chromeos_update_engine {
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index cd31805..1c79fb0 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -10,9 +10,10 @@
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
 
+#include "base/string_number_conversions.h"
 #include "base/string_util.h"
 #include "base/time.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/action_pipe.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/prefs_interface.h"
@@ -294,9 +295,9 @@
                                    ConstXMLStr("elapsed_seconds")));
 
   int64_t elapsed_seconds = 0;
-  TEST_AND_RETURN_FALSE(StringToInt64(XmlGetProperty(daystart_node,
-                                                     "elapsed_seconds"),
-                                      &elapsed_seconds));
+  TEST_AND_RETURN_FALSE(base::StringToInt64(XmlGetProperty(daystart_node,
+                                                           "elapsed_seconds"),
+                                            &elapsed_seconds));
   TEST_AND_RETURN_FALSE(elapsed_seconds >= 0);
 
   // Remember the local time that matches the server's last midnight
diff --git a/prefs.cc b/prefs.cc
index 39f5908..7e98e79 100644
--- a/prefs.cc
+++ b/prefs.cc
@@ -6,6 +6,7 @@
 
 #include "base/file_util.h"
 #include "base/logging.h"
+#include "base/string_number_conversions.h"
 #include "base/string_util.h"
 #include "update_engine/utils.h"
 
@@ -45,12 +46,12 @@
   string str_value;
   TEST_AND_RETURN_FALSE(GetString(key, &str_value));
   TrimWhitespaceASCII(str_value, TRIM_ALL, &str_value);
-  TEST_AND_RETURN_FALSE(StringToInt64(str_value, value));
+  TEST_AND_RETURN_FALSE(base::StringToInt64(str_value, value));
   return true;
 }
 
 bool Prefs::SetInt64(const string& key, const int64_t value) {
-  return SetString(key, Int64ToString(value));
+  return SetString(key, base::Int64ToString(value));
 }
 
 bool Prefs::GetFileNameForKey(const std::string& key, FilePath* filename) {
diff --git a/subprocess.cc b/subprocess.cc
index 696779f..c319a22 100755
--- a/subprocess.cc
+++ b/subprocess.cc
@@ -7,7 +7,7 @@
 #include <string.h>
 #include <string>
 #include <vector>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "base/scoped_ptr.h"
 #include "base/string_util.h"
 
diff --git a/subprocess.h b/subprocess.h
index 7fd3052..6685f4d 100644
--- a/subprocess.h
+++ b/subprocess.h
@@ -10,7 +10,7 @@
 #include <vector>
 #include <glib.h>
 #include "base/basictypes.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 // The Subprocess class is a singleton. It's used to spawn off a subprocess
 // and get notified when the subprocess exits. The result of Exec() can
diff --git a/tarjan.cc b/tarjan.cc
index aaca7d0..b54a634 100644
--- a/tarjan.cc
+++ b/tarjan.cc
@@ -4,7 +4,7 @@
 
 #include <algorithm>
 #include <vector>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/tarjan.h"
 #include "update_engine/utils.h"
 
diff --git a/tarjan_unittest.cc b/tarjan_unittest.cc
index 9c4d7a8..a9f2c8b 100644
--- a/tarjan_unittest.cc
+++ b/tarjan_unittest.cc
@@ -4,7 +4,7 @@
 
 #include <utility>
 #include <gtest/gtest.h>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/graph_types.h"
 #include "update_engine/tarjan.h"
 #include "update_engine/utils.h"
diff --git a/test_http_server.cc b/test_http_server.cc
index 3f6897c..3c2ee54 100644
--- a/test_http_server.cc
+++ b/test_http_server.cc
@@ -22,7 +22,7 @@
 #include <algorithm>
 #include <string>
 #include <vector>
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 
 using std::min;
 using std::string;
diff --git a/test_utils.cc b/test_utils.cc
index a075c2d..c1bdb48 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -16,7 +16,7 @@
 #include <vector>
 
 #include "base/string_util.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/file_writer.h"
 #include "update_engine/filesystem_iterator.h"
 #include "update_engine/utils.h"
diff --git a/utils.cc b/utils.cc
index 134ad80..cf1c3f5 100644
--- a/utils.cc
+++ b/utils.cc
@@ -21,7 +21,7 @@
 #include "base/file_path.h"
 #include "base/file_util.h"
 #include "base/string_util.h"
-#include "chromeos/obsolete_logging.h"
+#include "base/logging.h"
 #include "update_engine/file_writer.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/subprocess.h"