From 540659481e1a9f87872566b59d15ba1ce75d1c1f Mon Sep 17 00:00:00 2001 From: "petkov@chromium.org" Date: Thu, 22 Jul 2010 22:47:16 +0000 Subject: Show an error update engine status for all unknown states. The primary reason for this patch is so that I can add a new UPDATE_STATUS enum value to libcros without breaking the Chrome OS build with the following error: "Right now we get the following error with LKGR of Chrome: update_observer.cc: In member function 'virtual void chromeos::UpdateObserver::Changed(chromeos::UpdateLibrary*)': update_observer.cc:26: error: enumeration value 'UPDATE_STATUS_REPORTING_ERROR_EVENT' not handled in switch" BUG=560 TEST=emerged chromeos-chrome with modified libcros, unit tests Review URL: http://codereview.chromium.org/3053010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53409 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/update_observer.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chrome/browser/chromeos/update_observer.cc b/chrome/browser/chromeos/update_observer.cc index ac1af56..56c919e 100644 --- a/chrome/browser/chromeos/update_observer.cc +++ b/chrome/browser/chromeos/update_observer.cc @@ -24,9 +24,6 @@ UpdateObserver::~UpdateObserver() { void UpdateObserver::Changed(UpdateLibrary* object) { switch (object->status().status) { - case UPDATE_STATUS_ERROR: - notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_ERROR), true); - break; case UPDATE_STATUS_IDLE: case UPDATE_STATUS_CHECKING_FOR_UPDATE: // Do nothing in these cases, we don't want to notify the user of the @@ -59,8 +56,10 @@ void UpdateObserver::Changed(UpdateLibrary* object) { case UPDATE_STATUS_UPDATED_NEED_REBOOT: notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED), true); break; + default: + notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_ERROR), true); + break; } } } // namespace chromeos - -- cgit v1.1