update_engine: Include base/macros.h instead of base/basictypes.h
update_engine no longer uses the integer types from base/basictypes.h.
It should simply include base/macros.h for the DISALLOW_COPY_AND_ASSIGN
macro instead.
BUG=None
TEST=`FEATURES=test emerge-$BOARD update_engine`
Change-Id: Idf18bc69339b7170122b289342c724c862454062
Reviewed-on: https://chromium-review.googlesource.com/216140
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/action.h b/action.h
index c7fcba6..32bb302 100644
--- a/action.h
+++ b/action.h
@@ -10,8 +10,8 @@
#include <memory>
#include <string>
-#include <base/basictypes.h>
#include <base/logging.h>
+#include <base/macros.h>
#include "update_engine/action_pipe.h"
#include "update_engine/action_processor.h"
diff --git a/action_pipe.h b/action_pipe.h
index f6d9434..cd676c6 100644
--- a/action_pipe.h
+++ b/action_pipe.h
@@ -11,8 +11,8 @@
#include <memory>
#include <string>
-#include <base/basictypes.h>
#include <base/logging.h>
+#include <base/macros.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/action_processor.h b/action_processor.h
index cb1aeb2..b3cc67b 100644
--- a/action_processor.h
+++ b/action_processor.h
@@ -7,7 +7,7 @@
#include <deque>
-#include "base/basictypes.h"
+#include <base/macros.h>
#include "update_engine/error_code.h"
diff --git a/certificate_checker.h b/certificate_checker.h
index eb49911..b5f7a15 100644
--- a/certificate_checker.h
+++ b/certificate_checker.h
@@ -5,12 +5,13 @@
#ifndef UPDATE_ENGINE_CERTIFICATE_CHECKER_H_
#define UPDATE_ENGINE_CERTIFICATE_CHECKER_H_
+#include <curl/curl.h>
+#include <openssl/ssl.h>
+
#include <string>
-#include <base/basictypes.h>
-#include <curl/curl.h>
+#include <base/macros.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
-#include <openssl/ssl.h>
#include "update_engine/system_state.h"
diff --git a/connection_manager.h b/connection_manager.h
index 0a2aabd..c77adee 100644
--- a/connection_manager.h
+++ b/connection_manager.h
@@ -5,7 +5,7 @@
#ifndef UPDATE_ENGINE_CONNECTION_MANAGER_H_
#define UPDATE_ENGINE_CONNECTION_MANAGER_H_
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/dbus_wrapper_interface.h"
diff --git a/extent_ranges.h b/extent_ranges.h
index b85ecbd..4376d05 100644
--- a/extent_ranges.h
+++ b/extent_ranges.h
@@ -9,7 +9,7 @@
#include <set>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/update_metadata.pb.h"
diff --git a/fake_prefs.h b/fake_prefs.h
index 240856a..f4174bf 100644
--- a/fake_prefs.h
+++ b/fake_prefs.h
@@ -8,7 +8,7 @@
#include <map>
#include <string>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/prefs_interface.h"
diff --git a/hardware.h b/hardware.h
index 1fa2edf..82b94e4 100644
--- a/hardware.h
+++ b/hardware.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/hardware_interface.h"
diff --git a/http_common.cc b/http_common.cc
index 8cdc6eb..756fa55 100644
--- a/http_common.cc
+++ b/http_common.cc
@@ -6,7 +6,7 @@
#include "update_engine/http_common.h"
-#include "base/basictypes.h"
+#include <base/macros.h>
namespace chromeos_update_engine {
diff --git a/http_fetcher.h b/http_fetcher.h
index 9c92abb..b8c6ad6 100644
--- a/http_fetcher.h
+++ b/http_fetcher.h
@@ -9,10 +9,11 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <glib.h>
+
#include <base/callback.h>
#include <base/logging.h>
-#include <glib.h>
+#include <base/macros.h>
#include "update_engine/http_common.h"
#include "update_engine/proxy_resolver.h"
diff --git a/hwid_override.cc b/hwid_override.cc
index 600a012..064b2a2 100644
--- a/hwid_override.cc
+++ b/hwid_override.cc
@@ -7,7 +7,6 @@
#include <map>
#include <string>
-#include <base/basictypes.h>
#include <base/files/file_path.h>
#include <base/file_util.h>
diff --git a/hwid_override.h b/hwid_override.h
index 86cb53a..dc0873b 100644
--- a/hwid_override.h
+++ b/hwid_override.h
@@ -8,8 +8,8 @@
#include <map>
#include <string>
-#include <base/basictypes.h>
#include <base/files/file_path.h>
+#include <base/macros.h>
namespace chromeos_update_engine {
@@ -24,6 +24,7 @@
static std::string Read(const base::FilePath& root);
static const char kHwidOverrideKey[];
+
private:
DISALLOW_COPY_AND_ASSIGN(HwidOverride);
};
diff --git a/install_plan.h b/install_plan.h
index 6b91d10..8ccabc6 100644
--- a/install_plan.h
+++ b/install_plan.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/action.h"
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index c59ca05..d483009 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -9,11 +9,12 @@
#include <string>
#include <utility>
-#include <base/basictypes.h>
-#include <base/logging.h>
#include <curl/curl.h>
#include <glib.h>
+#include <base/logging.h>
+#include <base/macros.h>
+
#include "update_engine/certificate_checker.h"
#include "update_engine/hardware_interface.h"
#include "update_engine/http_fetcher.h"
diff --git a/mock_file_writer.h b/mock_file_writer.h
index f14b6ff..5231e40 100644
--- a/mock_file_writer.h
+++ b/mock_file_writer.h
@@ -7,7 +7,8 @@
#include <vector>
-#include "base/basictypes.h"
+#include <base/macros.h>
+
#include "update_engine/file_writer.h"
// MockFileWriter is an implementation of FileWriter. It will succeed
diff --git a/omaha_hash_calculator.h b/omaha_hash_calculator.h
index b7d681d..b9bfa4f 100644
--- a/omaha_hash_calculator.h
+++ b/omaha_hash_calculator.h
@@ -5,13 +5,14 @@
#ifndef UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H_
#define UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H_
-#include <string>
+#include <openssl/sha.h>
#include <unistd.h>
+
+#include <string>
#include <vector>
-#include <openssl/sha.h>
-#include <base/basictypes.h>
#include <base/logging.h>
+#include <base/macros.h>
// Omaha uses base64 encoded SHA-256 as the hash. This class provides a simple
// wrapper around OpenSSL providing such a formatted hash of data passed in.
diff --git a/omaha_request_params.h b/omaha_request_params.h
index 8acbc4e..4d249b3 100644
--- a/omaha_request_params.h
+++ b/omaha_request_params.h
@@ -9,7 +9,7 @@
#include <string>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include <base/time/time.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
diff --git a/payload_constants.h b/payload_constants.h
index 58e7572..30dde5e 100644
--- a/payload_constants.h
+++ b/payload_constants.h
@@ -5,7 +5,9 @@
#ifndef UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_
#define UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_
-#include <base/basictypes.h>
+#include <stdint.h>
+
+#include <limits>
namespace chromeos_update_engine {
@@ -14,8 +16,8 @@
// A block number denoting a hole on a sparse file. Used on Extents to refer to
// section of blocks not present on disk on a sparse file.
-const uint64_t kSparseHole = kuint64max;
+const uint64_t kSparseHole = std::numeric_limits<uint64_t>::max();
-}; // namespace chromeos_update_engine
+} // namespace chromeos_update_engine
#endif // UPDATE_ENGINE_PAYLOAD_CONSTANTS_H_
diff --git a/payload_generator/delta_diff_generator.h b/payload_generator/delta_diff_generator.h
index 3c4ad69..ee5a409 100644
--- a/payload_generator/delta_diff_generator.h
+++ b/payload_generator/delta_diff_generator.h
@@ -9,7 +9,7 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/payload_generator/graph_types.h"
#include "update_engine/update_metadata.pb.h"
diff --git a/payload_generator/extent_mapper.h b/payload_generator/extent_mapper.h
index 24229e1..98a5452 100644
--- a/payload_generator/extent_mapper.h
+++ b/payload_generator/extent_mapper.h
@@ -8,8 +8,6 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
-
#include "update_engine/update_metadata.pb.h"
namespace chromeos_update_engine {
diff --git a/payload_generator/extent_mapper_unittest.cc b/payload_generator/extent_mapper_unittest.cc
index 3b23246..f56cca0 100644
--- a/payload_generator/extent_mapper_unittest.cc
+++ b/payload_generator/extent_mapper_unittest.cc
@@ -12,7 +12,7 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include <gtest/gtest.h>
#include "update_engine/payload_constants.h"
diff --git a/payload_generator/graph_types.h b/payload_generator/graph_types.h
index a85346f..f94183f 100644
--- a/payload_generator/graph_types.h
+++ b/payload_generator/graph_types.h
@@ -11,7 +11,7 @@
#include <utility>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/update_metadata.pb.h"
diff --git a/payload_generator/graph_utils.cc b/payload_generator/graph_utils.cc
index dd5d9df..a0ce802 100644
--- a/payload_generator/graph_utils.cc
+++ b/payload_generator/graph_utils.cc
@@ -8,8 +8,8 @@
#include <utility>
#include <vector>
-#include <base/basictypes.h>
#include <base/logging.h>
+#include <base/macros.h>
#include "update_engine/payload_constants.h"
diff --git a/payload_generator/graph_utils.h b/payload_generator/graph_utils.h
index 6712067..e4692e0 100644
--- a/payload_generator/graph_utils.h
+++ b/payload_generator/graph_utils.h
@@ -7,7 +7,7 @@
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
#include "update_engine/payload_generator/graph_types.h"
#include "update_engine/update_metadata.pb.h"
diff --git a/payload_generator/payload_signer.h b/payload_generator/payload_signer.h
index 0c540e6..8fb0a70 100644
--- a/payload_generator/payload_signer.h
+++ b/payload_generator/payload_signer.h
@@ -8,7 +8,8 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
+
#include "update_engine/update_metadata.pb.h"
// This class encapsulates methods used for payload signing.
diff --git a/payload_verifier.h b/payload_verifier.h
index ba392c9..f1668e9 100644
--- a/payload_verifier.h
+++ b/payload_verifier.h
@@ -8,7 +8,8 @@
#include <string>
#include <vector>
-#include <base/basictypes.h>
+#include <base/macros.h>
+
#include "update_engine/update_metadata.pb.h"
// This class encapsulates methods used for payload signature verification.
diff --git a/prefs_unittest.cc b/prefs_unittest.cc
index fa66bfd..6ff3945 100644
--- a/prefs_unittest.cc
+++ b/prefs_unittest.cc
@@ -6,11 +6,12 @@
#include <string>
-#include "base/basictypes.h"
-#include "base/file_util.h"
+#include <base/file_util.h>
+#include <base/macros.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
-#include "gtest/gtest.h"
+#include <gtest/gtest.h>
+
#include "update_engine/prefs.h"
using std::string;
diff --git a/subprocess.h b/subprocess.h
index 4279321..a666849 100644
--- a/subprocess.h
+++ b/subprocess.h
@@ -5,15 +5,15 @@
#ifndef UPDATE_ENGINE_SUBPROCESS_H_
#define UPDATE_ENGINE_SUBPROCESS_H_
+#include <glib.h>
+
#include <map>
#include <memory>
#include <string>
#include <vector>
-#include <glib.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
+#include <base/logging.h>
+#include <base/macros.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/update_manager/boxed_value.h b/update_manager/boxed_value.h
index 6b547b6..1ad9946 100644
--- a/update_manager/boxed_value.h
+++ b/update_manager/boxed_value.h
@@ -7,7 +7,7 @@
#include <string>
-#include <base/basictypes.h>
+#include <base/macros.h>
namespace chromeos_update_manager {
diff --git a/update_manager/provider.h b/update_manager/provider.h
index 13240fb..aac92d4 100644
--- a/update_manager/provider.h
+++ b/update_manager/provider.h
@@ -5,7 +5,7 @@
#ifndef UPDATE_ENGINE_UPDATE_MANAGER_PROVIDER_H_
#define UPDATE_ENGINE_UPDATE_MANAGER_PROVIDER_H_
-#include <base/basictypes.h>
+#include <base/macros.h>
namespace chromeos_update_manager {