Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: components/update_client/action_wait.cc

Issue 2453783002: Fix if statement condition in update_client/action_wait.cc (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/action_wait.cc
diff --git a/components/update_client/action_wait.cc b/components/update_client/action_wait.cc
index a4fddefb89c79a85ddb015ec63bd5f6d7629e194..45159d35a1f6120d538ff067c941a7eb43d8d63c 100644
--- a/components/update_client/action_wait.cc
+++ b/components/update_client/action_wait.cc
@@ -37,13 +37,10 @@ void ActionWait::Run(UpdateContext* update_context, Callback callback) {
// completed with an error.
while (!update_context->queue.empty()) {
auto* item = FindUpdateItemById(update_context->queue.front());
- if (!item) {
- item->error_category = static_cast<int>(ErrorCategory::kServiceError);
- item->error_code = static_cast<int>(ServiceError::ERROR_WAIT);
- ChangeItemState(item, CrxUpdateItem::State::kNoUpdate);
- } else {
- NOTREACHED();
- }
+ DCHECK(item);
+ item->error_category = static_cast<int>(ErrorCategory::kServiceError);
+ item->error_code = static_cast<int>(ServiceError::ERROR_WAIT);
+ ChangeItemState(item, CrxUpdateItem::State::kNoUpdate);
update_context->queue.pop();
}
callback.Run(static_cast<int>(ServiceError::ERROR_WAIT));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698