Chromium Code Reviews| Index: chrome/browser/chromeos/login/update_screen.cc |
| diff --git a/chrome/browser/chromeos/login/update_screen.cc b/chrome/browser/chromeos/login/update_screen.cc |
| index 99f90324909d9dee86684283fb2d84065f926a99..cf979529b43da5645606e2ca7432ba4a6e7b91b8 100644 |
| --- a/chrome/browser/chromeos/login/update_screen.cc |
| +++ b/chrome/browser/chromeos/login/update_screen.cc |
| @@ -50,7 +50,7 @@ const double kMinProgressStep = 1e-3; |
| // Smooth factor that is used for the average downloading speed |
| // estimation. |
| -const double kDownloadSpeedSmoothFactor = 0.005; |
| +const double kDownloadSpeedSmoothFactor = 0.1; |
|
Ivan Korotkov
2012/08/24 09:01:36
Please comment what that means.
ygorshenin1
2012/08/27 12:54:16
Done.
|
| // Minumum allowed value for the average downloading speed. |
| const double kDownloadAverageSpeedDropBound = 1e-8; |
| @@ -139,7 +139,9 @@ void UpdateScreen::UpdateStatusChanged( |
| } else { |
| LOG(INFO) << "Critical update available: " |
| << status.new_version; |
| - actor_->ShowPreparingUpdatesInfo(true); |
| + actor_->SetProgressMessage( |
| + UpdateScreenActor::PROGRESS_MESSAGE_UPDATE_AVAILABLE); |
| + actor_->ShowProgressMessage(true); |
| actor_->ShowCurtain(false); |
| } |
| break; |
| @@ -162,7 +164,9 @@ void UpdateScreen::UpdateStatusChanged( |
| } else { |
| LOG(INFO) << "Critical update available: " |
| << status.new_version; |
| - actor_->ShowPreparingUpdatesInfo(false); |
| + actor_->SetProgressMessage( |
| + UpdateScreenActor::PROGRESS_MESSAGE_INSTALLING_UPDATE); |
| + actor_->ShowProgressMessage(true); |
| actor_->ShowCurtain(false); |
| } |
| } |
| @@ -172,12 +176,15 @@ void UpdateScreen::UpdateStatusChanged( |
| case UpdateEngineClient::UPDATE_STATUS_VERIFYING: |
| MakeSureScreenIsShown(); |
| actor_->SetProgress(kBeforeVerifyingProgress); |
| - actor_->ShowEstimatedTimeLeft(false); |
| + actor_->SetProgressMessage(UpdateScreenActor::PROGRESS_MESSAGE_VERIFYING); |
| + actor_->ShowProgressMessage(true); |
| break; |
| case UpdateEngineClient::UPDATE_STATUS_FINALIZING: |
| MakeSureScreenIsShown(); |
| actor_->SetProgress(kBeforeFinalizingProgress); |
| - actor_->ShowEstimatedTimeLeft(false); |
| + actor_->SetProgressMessage( |
| + UpdateScreenActor::PROGRESS_MESSAGE_FINALIZING); |
| + actor_->ShowProgressMessage(true); |
| break; |
| case UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT: |
| MakeSureScreenIsShown(); |
| @@ -321,9 +328,7 @@ void UpdateScreen::UpdateDownloadingStats( |
| if (!actor_) |
| return; |
| base::Time download_current_time = base::Time::Now(); |
| - if (download_current_time >= download_last_time_ + kMinTimeStep && |
| - status.download_progress >= |
| - download_last_progress_ + kMinProgressStep) { |
| + if (download_current_time >= download_last_time_ + kMinTimeStep) { |
| // Estimate downloading rate. |
| double progress_delta = |
| std::max(status.download_progress - download_last_progress_, 0.0); |