Commit 4da12d2d authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Fix DCHECK for rlz_lib::UpdateExistingAccessPointRlz

|UpdateExistingAccessPointRlz| involves file I/O, so it should be
posted on a task runner that has MayBlock() in its TaskTraits.
|background_task_runner_| serves this purpose.

Bug: 906293
Change-Id: If36215767a0dbcfbad56c0432b16b584f6185376
Reviewed-on: https://chromium-review.googlesource.com/c/1340607Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609428}
parent f9e09207
...@@ -303,7 +303,12 @@ bool RLZTracker::Init(bool first_run, ...@@ -303,7 +303,12 @@ bool RLZTracker::Init(bool first_run,
delegate_->IsBrandOrganic(reactivation_brand_)) { delegate_->IsBrandOrganic(reactivation_brand_)) {
SYSLOG(INFO) << "RLZ is disabled"; SYSLOG(INFO) << "RLZ is disabled";
} else { } else {
rlz_lib::UpdateExistingAccessPointRlz(brand_); background_task_runner_->PostTask(
FROM_HERE, base::BindOnce(
[](const std::string& brand) {
rlz_lib::UpdateExistingAccessPointRlz(brand);
},
brand_));
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment