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

Unified Diff: components/update_client/update_engine.cc

Issue 2853903002: Handle the case where the update check for components fails. (Closed)
Patch Set: Created 3 years, 8 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 | « components/update_client/update_client_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_engine.cc
diff --git a/components/update_client/update_engine.cc b/components/update_client/update_engine.cc
index afef9097097c21598b51bcd0e655cda99f66ee3e..f56793f78bd9a1c99cf5737d061a52213ff89418 100644
--- a/components/update_client/update_engine.cc
+++ b/components/update_client/update_engine.cc
@@ -219,14 +219,6 @@ void UpdateEngine::UpdateCheckComplete(const UpdateContextIterator& it) {
const auto& update_context = *it;
DCHECK(update_context);
- if (update_context->update_check_error) {
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE,
- base::Bind(&UpdateEngine::UpdateComplete, base::Unretained(this), it,
- Error::UPDATE_CHECK_ERROR));
- return;
- }
-
for (const auto& id : update_context->ids)
update_context->component_queue.push(id);
@@ -244,9 +236,12 @@ void UpdateEngine::HandleComponent(const UpdateContextIterator& it) {
auto& queue = update_context->component_queue;
if (queue.empty()) {
+ const Error error = update_context->update_check_error
+ ? Error::UPDATE_CHECK_ERROR
+ : Error::NONE;
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&UpdateEngine::UpdateComplete,
- base::Unretained(this), it, Error::NONE));
+ base::Unretained(this), it, error));
return;
}
« no previous file with comments | « components/update_client/update_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698