Replace is_interactive with interactive for consistency in the code.
Bug: none
Test: unittests
Change-Id: I8c98860cfeadb52c7f8e4931d2ad154ae4211d47
diff --git a/update_manager/android_things_policy.cc b/update_manager/android_things_policy.cc
index d4b9442..20d10d8 100644
--- a/update_manager/android_things_policy.cc
+++ b/update_manager/android_things_policy.cc
@@ -53,7 +53,7 @@
result->updates_enabled = true;
result->target_channel.clear();
result->target_version_prefix.clear();
- result->is_interactive = false;
+ result->interactive = false;
// Build a list of policies to consult. Note that each policy may modify the
// result structure, even if it signals kContinue.
diff --git a/update_manager/android_things_policy_unittest.cc b/update_manager/android_things_policy_unittest.cc
index 8a50bc2..6961efc 100644
--- a/update_manager/android_things_policy_unittest.cc
+++ b/update_manager/android_things_policy_unittest.cc
@@ -97,7 +97,7 @@
ExpectPolicyStatus(
EvalStatus::kSucceeded, &Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmAndroidThingsPolicyTest,
@@ -140,7 +140,7 @@
ExpectPolicyStatus(
EvalStatus::kSucceeded, &Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_TRUE(result.is_interactive);
+ EXPECT_TRUE(result.interactive);
}
TEST_F(UmAndroidThingsPolicyTest,
@@ -156,7 +156,7 @@
ExpectPolicyStatus(
EvalStatus::kSucceeded, &Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmAndroidThingsPolicyTest, UpdateCanBeAppliedOk) {
diff --git a/update_manager/chromeos_policy.cc b/update_manager/chromeos_policy.cc
index a56758f..ae2ec9d 100644
--- a/update_manager/chromeos_policy.cc
+++ b/update_manager/chromeos_policy.cc
@@ -199,7 +199,7 @@
result->updates_enabled = true;
result->target_channel.clear();
result->target_version_prefix.clear();
- result->is_interactive = false;
+ result->interactive = false;
EnoughSlotsAbUpdatesPolicyImpl enough_slots_ab_updates_policy;
EnterpriseDevicePolicyImpl enterprise_device_policy;
@@ -324,7 +324,7 @@
bool is_scattering_applicable = false;
result->scatter_wait_period = kZeroInterval;
result->scatter_check_threshold = 0;
- if (!update_state.is_interactive) {
+ if (!update_state.interactive) {
const bool* is_oobe_enabled_p = ec->GetValue(
state->config_provider()->var_is_oobe_enabled());
if (is_oobe_enabled_p && !(*is_oobe_enabled_p)) {
@@ -372,7 +372,7 @@
// interactive, and other limits haven't been reached.
if (update_state.p2p_downloading_disabled) {
LOG(INFO) << "Blocked P2P downloading because it is disabled by Omaha.";
- } else if (update_state.is_interactive) {
+ } else if (update_state.interactive) {
LOG(INFO) << "Blocked P2P downloading because update is interactive.";
} else if (update_state.p2p_num_attempts >= kMaxP2PAttempts) {
LOG(INFO) << "Blocked P2P downloading as it was attempted too many "
@@ -572,7 +572,7 @@
bool may_backoff = false;
if (update_state.is_backoff_disabled) {
LOG(INFO) << "Backoff disabled by Omaha.";
- } else if (update_state.is_interactive) {
+ } else if (update_state.interactive) {
LOG(INFO) << "No backoff for interactive updates.";
} else if (update_state.is_delta_payload) {
LOG(INFO) << "No backoff for delta payloads.";
diff --git a/update_manager/chromeos_policy_unittest.cc b/update_manager/chromeos_policy_unittest.cc
index df29e8c..095f516 100644
--- a/update_manager/chromeos_policy_unittest.cc
+++ b/update_manager/chromeos_policy_unittest.cc
@@ -140,7 +140,7 @@
ExpectPolicyStatus(EvalStatus::kSucceeded,
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest, UpdateCheckAllowedWaitsForOOBE) {
@@ -178,7 +178,7 @@
ExpectPolicyStatus(EvalStatus::kSucceeded,
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest, UpdateCheckAllowedWithAttributes) {
@@ -200,7 +200,7 @@
EXPECT_TRUE(result.updates_enabled);
EXPECT_EQ("1.2", result.target_version_prefix);
EXPECT_EQ("foo-channel", result.target_channel);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest,
@@ -256,7 +256,7 @@
ExpectPolicyStatus(EvalStatus::kSucceeded,
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_TRUE(result.is_interactive);
+ EXPECT_TRUE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest, UpdateCheckAllowedForcedUpdateRequestedPeriodic) {
@@ -271,7 +271,7 @@
ExpectPolicyStatus(EvalStatus::kSucceeded,
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest, UpdateCheckAllowedKioskPin) {
@@ -293,7 +293,7 @@
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
EXPECT_EQ("1234.0.0", result.target_version_prefix);
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest, UpdateCheckAllowedDisabledWhenNoKioskPin) {
@@ -333,7 +333,7 @@
&Policy::UpdateCheckAllowed, &result);
EXPECT_TRUE(result.updates_enabled);
EXPECT_TRUE(result.target_version_prefix.empty());
- EXPECT_FALSE(result.is_interactive);
+ EXPECT_FALSE(result.interactive);
}
TEST_F(UmChromeOSPolicyTest,
@@ -561,7 +561,7 @@
update_state.download_errors.emplace_back(
0, ErrorCode::kDownloadTransferError,
curr_time - TimeDelta::FromSeconds(2));
- update_state.is_interactive = true;
+ update_state.interactive = true;
// Check that UpdateCanStart returns false and a new backoff expiry is
// generated.
@@ -798,7 +798,7 @@
new TimeDelta(TimeDelta::FromSeconds(1)));
UpdateState update_state = GetDefaultUpdateState(TimeDelta::FromSeconds(1));
- update_state.is_interactive = true;
+ update_state.interactive = true;
update_state.scatter_check_threshold = 0;
update_state.scatter_check_threshold_min = 2;
update_state.scatter_check_threshold_max = 5;
@@ -828,7 +828,7 @@
fake_state_.system_provider()->var_is_oobe_complete()->reset(new bool(false));
UpdateState update_state = GetDefaultUpdateState(TimeDelta::FromSeconds(1));
- update_state.is_interactive = true;
+ update_state.interactive = true;
update_state.scatter_check_threshold = 0;
update_state.scatter_check_threshold_min = 2;
update_state.scatter_check_threshold_max = 5;
diff --git a/update_manager/default_policy.cc b/update_manager/default_policy.cc
index 5da1520..bc4f98e 100644
--- a/update_manager/default_policy.cc
+++ b/update_manager/default_policy.cc
@@ -40,7 +40,7 @@
result->updates_enabled = true;
result->target_channel.clear();
result->target_version_prefix.clear();
- result->is_interactive = false;
+ result->interactive = false;
// Ensure that the minimum interval is set. If there's no clock, this defaults
// to always allowing the update.
diff --git a/update_manager/interactive_update_policy_impl.cc b/update_manager/interactive_update_policy_impl.cc
index df7f17b..03af435 100644
--- a/update_manager/interactive_update_policy_impl.cc
+++ b/update_manager/interactive_update_policy_impl.cc
@@ -31,10 +31,10 @@
ec->GetValue(updater_provider->var_forced_update_requested());
if (forced_update_requested_p != nullptr &&
*forced_update_requested_p != UpdateRequestStatus::kNone) {
- result->is_interactive =
+ result->interactive =
(*forced_update_requested_p == UpdateRequestStatus::kInteractive);
LOG(INFO) << "Forced update signaled ("
- << (result->is_interactive ? "interactive" : "periodic")
+ << (result->interactive ? "interactive" : "periodic")
<< "), allowing update check.";
return EvalStatus::kSucceeded;
}
diff --git a/update_manager/policy.h b/update_manager/policy.h
index 05bb2ad..f7a72d8 100644
--- a/update_manager/policy.h
+++ b/update_manager/policy.h
@@ -51,7 +51,7 @@
std::string target_channel;
// Whether the allowed update is interactive (user-initiated) or periodic.
- bool is_interactive;
+ bool interactive;
};
// Input arguments to UpdateCanStart.
@@ -64,7 +64,7 @@
//
// Whether the current update check is an interactive one. The caller should
// feed the value returned by the preceding call to UpdateCheckAllowed().
- bool is_interactive;
+ bool interactive;
// Whether it is a delta payload.
bool is_delta_payload;
// Wallclock time when payload was first (consecutively) offered by Omaha.
diff --git a/update_manager/policy_test_utils.cc b/update_manager/policy_test_utils.cc
index fbfcb82..d9a9857 100644
--- a/update_manager/policy_test_utils.cc
+++ b/update_manager/policy_test_utils.cc
@@ -73,7 +73,7 @@
// This is a non-interactive check returning a delta payload, seen for the
// first time (|first_seen_period| ago). Clearly, there were no failed
// attempts so far.
- update_state.is_interactive = false;
+ update_state.interactive = false;
update_state.is_delta_payload = false;
update_state.first_seen = first_seen_time;
update_state.num_checks = 1;
diff --git a/update_manager/real_updater_provider.cc b/update_manager/real_updater_provider.cc
index 050bd42..094e79c 100644
--- a/update_manager/real_updater_provider.cc
+++ b/update_manager/real_updater_provider.cc
@@ -401,11 +401,11 @@
return new UpdateRequestStatus(update_request_status_);
}
- void Reset(bool forced_update_requested, bool is_interactive) {
+ void Reset(bool forced_update_requested, bool interactive) {
UpdateRequestStatus new_value = UpdateRequestStatus::kNone;
if (forced_update_requested)
- new_value = (is_interactive ? UpdateRequestStatus::kInteractive :
- UpdateRequestStatus::kPeriodic);
+ new_value = (interactive ? UpdateRequestStatus::kInteractive
+ : UpdateRequestStatus::kPeriodic);
if (update_request_status_ != new_value) {
update_request_status_ = new_value;
NotifyValueChanged();
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index c2766ea..125a60c 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -189,7 +189,7 @@
TEST_F(UmUpdateManagerTest, PolicyRequestCallUpdateCanStart) {
UpdateState update_state = UpdateState();
- update_state.is_interactive = true;
+ update_state.interactive = true;
update_state.is_delta_payload = false;
update_state.first_seen = FixedTime();
update_state.num_checks = 1;