Lines Matching defs:percent
172 int32_t DownloadThread::DownloadCallback(uint32_t percent, UpgradeStatus status, const std::string &error)
178 ENGINE_CHECK_NO_LOG(!DealAbnormal(percent),
181 if (downloadProgress_.status == status && downloadProgress_.percent == percent) {
185 ENGINE_LOGI("DownloadCallback percent %d, status %d, exitDownload_ %d, error %s, downloadFileName_ %s",
186 percent, CAST_INT(status), exitDownload_ ? 1 : 0, error.c_str(), downloadFileName_.c_str());
191 } else if (percent != DOWNLOAD_FINISH_PERCENT &&
192 (percent < (downloadProgress_.percent + DOWNLOAD_PERIOD_PERCENT))) {
197 if (percent == DOWNLOAD_FINISH_PERCENT
202 downloadProgress_.percent = percent;
217 unsigned int percent = (dlNow + curr) / (curr + dlTotal) * DOWNLOAD_FINISH_PERCENT;
218 return engine->DownloadCallback(percent, UpgradeStatus::DOWNLOADING, "");
242 bool DownloadThread::DealAbnormal(uint32_t percent)
249 downloadProgress_.percent = percent;