update_engine: Replace NULL with nullptr

Replaced the usage of NULL with nullptr. This also makes it possible to
use standard gtest macros to compare pointers in Update Manager's unit tests.
So, there is no need in custom UMTEST_... macros which are replaced with the
gtest macros (see change in update_engine/update_manager/umtest_utils.h):

UMTEST_ASSERT_NULL(p)      => ASSERT_EQ(nullptr, p)
UMTEST_ASSERT_NOT_NULL(p)  => ASSERT_NE(nullptr, p)
UMTEST_EXPECT_NULL(p)      => EXPECT_EQ(nullptr, p)
UMTEST_EXPECT_NOT_NULL(p)  => EXPECT_NE(nullptr, p)

BUG=None
TEST=FEATURES=test emerge-link update_engine
     USE="clang asan" FEATURES=test emerge-link update_engine

Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec
Reviewed-on: https://chromium-review.googlesource.com/215136
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/omaha_request_params.cc b/omaha_request_params.cc
index 73117a4..71185f6 100644
--- a/omaha_request_params.cc
+++ b/omaha_request_params.cc
@@ -59,24 +59,24 @@
   os_platform_ = OmahaRequestParams::kOsPlatform;
   os_version_ = OmahaRequestParams::kOsVersion;
   app_version_ = in_app_version.empty() ?
-      GetLsbValue("CHROMEOS_RELEASE_VERSION", "", NULL, stateful_override) :
+      GetLsbValue("CHROMEOS_RELEASE_VERSION", "", nullptr, stateful_override) :
       in_app_version;
   os_sp_ = app_version_ + "_" + GetMachineType();
   os_board_ = GetLsbValue("CHROMEOS_RELEASE_BOARD",
                           "",
-                          NULL,
+                          nullptr,
                           stateful_override);
   string release_app_id = GetLsbValue("CHROMEOS_RELEASE_APPID",
                                       OmahaRequestParams::kAppId,
-                                      NULL,
+                                      nullptr,
                                       stateful_override);
   board_app_id_ = GetLsbValue("CHROMEOS_BOARD_APPID",
                               release_app_id,
-                              NULL,
+                              nullptr,
                               stateful_override);
   canary_app_id_ = GetLsbValue("CHROMEOS_CANARY_APPID",
                                release_app_id,
-                               NULL,
+                               nullptr,
                                stateful_override);
   app_lang_ = "en-US";
   hwid_ = system_state_->hardware()->GetHardwareClass();
@@ -103,7 +103,7 @@
   }
 
   if (in_update_url.empty())
-    update_url_ = GetLsbValue("CHROMEOS_AUSERVER", kProductionOmahaUrl, NULL,
+    update_url_ = GetLsbValue("CHROMEOS_AUSERVER", kProductionOmahaUrl, nullptr,
                               stateful_override);
   else
     update_url_ = in_update_url;
@@ -165,7 +165,7 @@
   string current_channel_new_value = GetLsbValue(
       kUpdateChannelKey,
       current_channel_,
-      NULL,  // No need to validate the read-only rootfs channel.
+      nullptr,  // No need to validate the read-only rootfs channel.
       false);  // stateful_override is false so we get the current channel.
 
   if (current_channel_ != current_channel_new_value) {
@@ -179,7 +179,7 @@
   string is_powerwash_allowed_str = GetLsbValue(
       kIsPowerwashAllowedKey,
       "false",
-      NULL,   // no need to validate
+      nullptr,  // no need to validate
       true);  // always get it from stateful, as that's the only place it'll be
   bool is_powerwash_allowed_new_value = (is_powerwash_allowed_str == "true");
   if (is_powerwash_allowed_ != is_powerwash_allowed_new_value) {