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

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

Issue 2807013: Update screen refactoring, exit on successful update. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: merge Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/update_view.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/update_screen.h" 5 #include "chrome/browser/chromeos/login/update_screen.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/login/screen_observer.h" 8 #include "chrome/browser/chromeos/login/screen_observer.h"
9 #include "chrome/browser/chromeos/login/update_view.h" 9 #include "chrome/browser/chromeos/login/update_view.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 checking_for_update_ = false; 59 checking_for_update_ = false;
60 // Advance view progress bar. 60 // Advance view progress bar.
61 view()->AddProgress(kAfterUpdateCheckProgressIncrement); 61 view()->AddProgress(kAfterUpdateCheckProgressIncrement);
62 // Create new Google Updater instance and install the update. 62 // Create new Google Updater instance and install the update.
63 google_updater_ = CreateGoogleUpdate(); 63 google_updater_ = CreateGoogleUpdate();
64 google_updater_->CheckForUpdate(true, NULL); 64 google_updater_->CheckForUpdate(true, NULL);
65 LOG(INFO) << "Installing an update"; 65 LOG(INFO) << "Installing an update";
66 break; 66 break;
67 case UPGRADE_SUCCESSFUL: 67 case UPGRADE_SUCCESSFUL:
68 view()->AddProgress(kUpdateCompleteProgressIncrement); 68 view()->AddProgress(kUpdateCompleteProgressIncrement);
69 // Fall through. 69 minimal_update_time_timer_.Stop();
70 checking_for_update_ = false;
71 // TODO(nkostylev): Call reboot API. http://crosbug.com/4002
72 ExitUpdate();
73 break;
70 case UPGRADE_ALREADY_UP_TO_DATE: 74 case UPGRADE_ALREADY_UP_TO_DATE:
71 checking_for_update_ = false; 75 checking_for_update_ = false;
72 view()->AddProgress(kAfterUpdateCheckProgressIncrement); 76 view()->AddProgress(kAfterUpdateCheckProgressIncrement);
73 // Fall through. 77 // Fall through.
74 case UPGRADE_ERROR: 78 case UPGRADE_ERROR:
75 if (MinimalUpdateTimeElapsed()) { 79 if (MinimalUpdateTimeElapsed()) {
76 ExitUpdate(); 80 ExitUpdate();
77 } 81 }
78 break; 82 break;
79 default: 83 default:
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 152
149 void UpdateScreen::OnMinimalUpdateTimeElapsed() { 153 void UpdateScreen::OnMinimalUpdateTimeElapsed() {
150 if (update_result_ == UPGRADE_SUCCESSFUL || 154 if (update_result_ == UPGRADE_SUCCESSFUL ||
151 update_result_ == UPGRADE_ALREADY_UP_TO_DATE || 155 update_result_ == UPGRADE_ALREADY_UP_TO_DATE ||
152 update_result_ == UPGRADE_ERROR) { 156 update_result_ == UPGRADE_ERROR) {
153 ExitUpdate(); 157 ExitUpdate();
154 } 158 }
155 } 159 }
156 160
157 } // namespace chromeos 161 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/update_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698