update_engine: Indicate existence of owner instead of owner's email in log.

Logging the device owner's email is possibly a PII, so instead log
whether the device has a owner as a boolean value.

Enterprise devices do not have a device owner.

The variable var_has_owner is dependent on DevicePolicy::GetOwner().

BUG=chromium:973108
TEST=unittest

Change-Id: I535f664a4fcf75c6102346b8566605710b062255
Reviewed-on: https://chromium-review.googlesource.com/1660911
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Ready: Jae Hoon Kim <kimjae@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/update_manager/evaluation_context_unittest.cc b/update_manager/evaluation_context_unittest.cc
index eb42eb7..151b0b5 100644
--- a/update_manager/evaluation_context_unittest.cc
+++ b/update_manager/evaluation_context_unittest.cc
@@ -210,13 +210,11 @@
   fake_const_var_.reset(new string("Hello world!"));
   EXPECT_EQ(*eval_ctx_->GetValue(&fake_const_var_), "Hello world!");
 
-  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 // Test that reevaluation occurs when an async variable it depends on changes.
@@ -286,23 +284,19 @@
   EXPECT_TRUE(value);
 
   // Ensure that we cannot reschedule an evaluation.
-  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 
   // Ensure that we can reschedule an evaluation after resetting expiration.
   eval_ctx_->ResetExpiration();
-  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 // Test that we clear the events when destroying the EvaluationContext.
@@ -348,13 +342,11 @@
   fake_poll_var_.reset(new string("Polled value"));
   eval_ctx_->GetValue(&fake_async_var_);
   eval_ctx_->GetValue(&fake_poll_var_);
-  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
   // TearDown() checks for leaked observers on this async_variable, which means
   // that our object is still alive after removing its reference.
 }
@@ -446,13 +438,11 @@
 
   // The "false" from IsWallclockTimeGreaterThan means that's not that timestamp
   // yet, so this should schedule a callback for when that happens.
-  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 TEST_F(UmEvaluationContextTest,
@@ -462,13 +452,11 @@
 
   // The "false" from IsMonotonicTimeGreaterThan means that's not that timestamp
   // yet, so this should schedule a callback for when that happens.
-  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_TRUE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 TEST_F(UmEvaluationContextTest,
@@ -481,13 +469,11 @@
       fake_clock_.GetWallclockTime() - TimeDelta::FromSeconds(1)));
 
   // Callback should not be scheduled.
-  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 TEST_F(UmEvaluationContextTest,
@@ -500,13 +486,11 @@
       fake_clock_.GetMonotonicTime() - TimeDelta::FromSeconds(1)));
 
   // Callback should not be scheduled.
-  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(
 #if BASE_VER < 576279
-      Bind(&base::DoNothing)
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(Bind(&base::DoNothing)));
 #else
-      base::DoNothing()
+  EXPECT_FALSE(eval_ctx_->RunOnValueChangeOrTimeout(base::DoNothing()));
 #endif
-          ));
 }
 
 TEST_F(UmEvaluationContextTest, DumpContext) {