cros: Check True value instead of False in IsStatefulEvent
Bug: 832867 Change-Id: Ie93bb1a9aa2ed051c437a56fe9aec25b6b99c60c Reviewed-on: https://chromium-review.googlesource.com/1017540 Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org> Reviewed-by: Roger Tawa <rogerta@chromium.org> Cr-Commit-Position: refs/heads/master@{#552175}
This commit is contained in:
@ -291,12 +291,17 @@ bool RlzValueStoreChromeOS::IsStatefulEvent(Product product,
|
|||||||
if (should_send_rlz_ping_value ==
|
if (should_send_rlz_ping_value ==
|
||||||
chromeos::system::kShouldSendRlzPingValueFalse) {
|
chromeos::system::kShouldSendRlzPingValueFalse) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if (should_send_rlz_ping_value !=
|
||||||
|
chromeos::system::kShouldSendRlzPingValueTrue) {
|
||||||
|
LOG(WARNING) << chromeos::system::kShouldSendRlzPingKey
|
||||||
|
<< " has an unexpected value: "
|
||||||
|
<< should_send_rlz_ping_value << ". Treat it as "
|
||||||
|
<< chromeos::system::kShouldSendRlzPingValueFalse
|
||||||
|
<< " to avoid sending duplicate rlz ping.";
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (!HasRlzEmbargoEndDatePassed())
|
if (!HasRlzEmbargoEndDatePassed())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
DCHECK_EQ(should_send_rlz_ping_value,
|
|
||||||
chromeos::system::kShouldSendRlzPingValueTrue);
|
|
||||||
} else {
|
} else {
|
||||||
// If |kShouldSendRlzPingKey| doesn't exist in RW_VPD, treat it in the
|
// If |kShouldSendRlzPingKey| doesn't exist in RW_VPD, treat it in the
|
||||||
// same way with the case of |kShouldSendRlzPingValueFalse|.
|
// same way with the case of |kShouldSendRlzPingValueFalse|.
|
||||||
@ -385,8 +390,8 @@ void RlzValueStoreChromeOS::OnSetRlzPingSent(bool success) {
|
|||||||
UMA_HISTOGRAM_BOOLEAN("Rlz.SetRlzPingSent", true);
|
UMA_HISTOGRAM_BOOLEAN("Rlz.SetRlzPingSent", true);
|
||||||
} else if (set_rlz_ping_sent_attempts_ >= kMaxRetryCount) {
|
} else if (set_rlz_ping_sent_attempts_ >= kMaxRetryCount) {
|
||||||
UMA_HISTOGRAM_BOOLEAN("Rlz.SetRlzPingSent", false);
|
UMA_HISTOGRAM_BOOLEAN("Rlz.SetRlzPingSent", false);
|
||||||
LOG(ERROR) << "Setting |should_send_rlz_ping| to 0 failed after "
|
LOG(ERROR) << "Setting " << chromeos::system::kShouldSendRlzPingKey
|
||||||
<< kMaxRetryCount << " attempts";
|
<< " failed after " << kMaxRetryCount << " attempts.";
|
||||||
} else {
|
} else {
|
||||||
SetRlzPingSent();
|
SetRlzPingSent();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user