diff options
author | petkov@chromium.org <petkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 18:52:02 +0000 |
---|---|---|
committer | petkov@chromium.org <petkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 18:52:02 +0000 |
commit | 382b497b6756b4a3ba5fd6e054c06f2e6b48d624 (patch) | |
tree | 37173965211c347cc24e8af521f5352f7b4e88b3 | |
parent | c30b09f4ad5e641b57271e639149170a1c039984 (diff) | |
download | chromium_src-382b497b6756b4a3ba5fd6e054c06f2e6b48d624.zip chromium_src-382b497b6756b4a3ba5fd6e054c06f2e6b48d624.tar.gz chromium_src-382b497b6756b4a3ba5fd6e054c06f2e6b48d624.tar.bz2 |
Handle the REPORTING_ERROR_EVENT state appropriately.
Notify the user of the error event if the user has been
notified about the update progress already. Stay quiet
otherwise.
BUG=chromium-os:5266
TEST=unit tests
Review URL: http://codereview.chromium.org/3033048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54789 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/update_observer.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/update_observer.cc b/chrome/browser/chromeos/update_observer.cc index 1765a8a..d92b8f4 100644 --- a/chrome/browser/chromeos/update_observer.cc +++ b/chrome/browser/chromeos/update_observer.cc @@ -56,6 +56,16 @@ void UpdateObserver::UpdateStatusChanged(UpdateLibrary* library) { case UPDATE_STATUS_UPDATED_NEED_REBOOT: notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED), true); break; + case UPDATE_STATUS_REPORTING_ERROR_EVENT: + // If the update engine encounters an error and we have already + // notified the user of the update progress, show an error + // notification. Don't show anything otherwise -- for example, + // in cases where the update engine encounters an error while + // checking for an update. + if (notification_.visible()) { + notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_ERROR), true); + } + break; default: notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_ERROR), true); break; |