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

Side by Side Diff: chrome/browser/chromeos/login/screens/update_screen.cc

Issue 309533006: Added processing for a lost status to UpdateEngineClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added status propagated. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/screens/update_screen.h" 5 #include "chrome/browser/chromeos/login/screens/update_screen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 ExitUpdate(REASON_UPDATE_NON_CRITICAL); 204 ExitUpdate(REASON_UPDATE_NON_CRITICAL);
205 } 205 }
206 break; 206 break;
207 case UpdateEngineClient::UPDATE_STATUS_IDLE: 207 case UpdateEngineClient::UPDATE_STATUS_IDLE:
208 if (ignore_idle_status_) { 208 if (ignore_idle_status_) {
209 // It is first IDLE status that is sent before we initiated the check. 209 // It is first IDLE status that is sent before we initiated the check.
210 break; 210 break;
211 } 211 }
212 // else no break 212 // else no break
213 213
214 case UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK:
215 VLOG(1) << "Attempting rollback";
216 break;
214 case UpdateEngineClient::UPDATE_STATUS_ERROR: 217 case UpdateEngineClient::UPDATE_STATUS_ERROR:
215 case UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT: 218 case UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT:
216 ExitUpdate(REASON_UPDATE_ENDED); 219 ExitUpdate(REASON_UPDATE_ENDED);
217 break; 220 break;
218 default: 221 default:
219 NOTREACHED(); 222 NOTREACHED();
220 break; 223 break;
221 } 224 }
222 } 225 }
223 226
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 case REASON_UPDATE_INIT_FAILED: 325 case REASON_UPDATE_INIT_FAILED:
323 get_screen_observer()->OnExit( 326 get_screen_observer()->OnExit(
324 ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE); 327 ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE);
325 break; 328 break;
326 case REASON_UPDATE_NON_CRITICAL: 329 case REASON_UPDATE_NON_CRITICAL:
327 case REASON_UPDATE_ENDED: 330 case REASON_UPDATE_ENDED:
328 { 331 {
329 UpdateEngineClient* update_engine_client = 332 UpdateEngineClient* update_engine_client =
330 DBusThreadManager::Get()->GetUpdateEngineClient(); 333 DBusThreadManager::Get()->GetUpdateEngineClient();
331 switch (update_engine_client->GetLastStatus().status) { 334 switch (update_engine_client->GetLastStatus().status) {
335 case UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK:
336 break;
332 case UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE: 337 case UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE:
333 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: 338 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT:
334 case UpdateEngineClient::UPDATE_STATUS_DOWNLOADING: 339 case UpdateEngineClient::UPDATE_STATUS_DOWNLOADING:
335 case UpdateEngineClient::UPDATE_STATUS_FINALIZING: 340 case UpdateEngineClient::UPDATE_STATUS_FINALIZING:
336 case UpdateEngineClient::UPDATE_STATUS_VERIFYING: 341 case UpdateEngineClient::UPDATE_STATUS_VERIFYING:
337 DCHECK(!HasCriticalUpdate()); 342 DCHECK(!HasCriticalUpdate());
338 // Noncritical update, just exit screen as if there is no update. 343 // Noncritical update, just exit screen as if there is no update.
339 // no break 344 // no break
340 case UpdateEngineClient::UPDATE_STATUS_IDLE: 345 case UpdateEngineClient::UPDATE_STATUS_IDLE:
341 get_screen_observer()->OnExit(ScreenObserver::UPDATE_NOUPDATE); 346 get_screen_observer()->OnExit(ScreenObserver::UPDATE_NOUPDATE);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, 517 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY,
513 std::string()); 518 std::string());
514 break; 519 break;
515 default: 520 default:
516 NOTREACHED(); 521 NOTREACHED();
517 break; 522 break;
518 } 523 }
519 } 524 }
520 525
521 } // namespace chromeos 526 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698