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

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: Switch fixed. 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_private/system_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 VLOG(1) << "Initiate reboot after update"; 197 VLOG(1) << "Initiate reboot after update";
198 DBusThreadManager::Get()->GetUpdateEngineClient()->RebootAfterUpdate(); 198 DBusThreadManager::Get()->GetUpdateEngineClient()->RebootAfterUpdate();
199 reboot_timer_.Start(FROM_HERE, 199 reboot_timer_.Start(FROM_HERE,
200 base::TimeDelta::FromSeconds(reboot_check_delay_), 200 base::TimeDelta::FromSeconds(reboot_check_delay_),
201 this, 201 this,
202 &UpdateScreen::OnWaitForRebootTimeElapsed); 202 &UpdateScreen::OnWaitForRebootTimeElapsed);
203 } else { 203 } else {
204 ExitUpdate(REASON_UPDATE_NON_CRITICAL); 204 ExitUpdate(REASON_UPDATE_NON_CRITICAL);
205 } 205 }
206 break; 206 break;
207 case UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK:
208 VLOG(1) << "Attempting rollback";
209 break;
207 case UpdateEngineClient::UPDATE_STATUS_IDLE: 210 case UpdateEngineClient::UPDATE_STATUS_IDLE:
208 if (ignore_idle_status_) { 211 if (ignore_idle_status_) {
209 // It is first IDLE status that is sent before we initiated the check. 212 // It is first IDLE status that is sent before we initiated the check.
210 break; 213 break;
211 } 214 }
212 // else no break 215 // else no break
213
214 case UpdateEngineClient::UPDATE_STATUS_ERROR: 216 case UpdateEngineClient::UPDATE_STATUS_ERROR:
215 case UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT: 217 case UpdateEngineClient::UPDATE_STATUS_REPORTING_ERROR_EVENT:
216 ExitUpdate(REASON_UPDATE_ENDED); 218 ExitUpdate(REASON_UPDATE_ENDED);
217 break; 219 break;
218 default: 220 default:
219 NOTREACHED(); 221 NOTREACHED();
220 break; 222 break;
221 } 223 }
222 } 224 }
223 225
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 case REASON_UPDATE_INIT_FAILED: 324 case REASON_UPDATE_INIT_FAILED:
323 get_screen_observer()->OnExit( 325 get_screen_observer()->OnExit(
324 ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE); 326 ScreenObserver::UPDATE_ERROR_CHECKING_FOR_UPDATE);
325 break; 327 break;
326 case REASON_UPDATE_NON_CRITICAL: 328 case REASON_UPDATE_NON_CRITICAL:
327 case REASON_UPDATE_ENDED: 329 case REASON_UPDATE_ENDED:
328 { 330 {
329 UpdateEngineClient* update_engine_client = 331 UpdateEngineClient* update_engine_client =
330 DBusThreadManager::Get()->GetUpdateEngineClient(); 332 DBusThreadManager::Get()->GetUpdateEngineClient();
331 switch (update_engine_client->GetLastStatus().status) { 333 switch (update_engine_client->GetLastStatus().status) {
334 case UpdateEngineClient::UPDATE_STATUS_ATTEMPTING_ROLLBACK:
335 break;
332 case UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE: 336 case UpdateEngineClient::UPDATE_STATUS_UPDATE_AVAILABLE:
333 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: 337 case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT:
334 case UpdateEngineClient::UPDATE_STATUS_DOWNLOADING: 338 case UpdateEngineClient::UPDATE_STATUS_DOWNLOADING:
335 case UpdateEngineClient::UPDATE_STATUS_FINALIZING: 339 case UpdateEngineClient::UPDATE_STATUS_FINALIZING:
336 case UpdateEngineClient::UPDATE_STATUS_VERIFYING: 340 case UpdateEngineClient::UPDATE_STATUS_VERIFYING:
337 DCHECK(!HasCriticalUpdate()); 341 DCHECK(!HasCriticalUpdate());
338 // Noncritical update, just exit screen as if there is no update. 342 // Noncritical update, just exit screen as if there is no update.
339 // no break 343 // no break
340 case UpdateEngineClient::UPDATE_STATUS_IDLE: 344 case UpdateEngineClient::UPDATE_STATUS_IDLE:
341 get_screen_observer()->OnExit(ScreenObserver::UPDATE_NOUPDATE); 345 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, 516 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY,
513 std::string()); 517 std::string());
514 break; 518 break;
515 default: 519 default:
516 NOTREACHED(); 520 NOTREACHED();
517 break; 521 break;
518 } 522 }
519 } 523 }
520 524
521 } // namespace chromeos 525 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_private/system_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698