| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/chromeos/update_observer.h" | |
| 6 | |
| 7 #include "base/string_number_conversions.h" | |
| 8 #include "base/utf_string_conversions.h" | |
| 9 #include "chrome/common/time_format.h" | |
| 10 #include "grit/generated_resources.h" | |
| 11 #include "grit/theme_resources.h" | |
| 12 #include "ui/base/l10n/l10n_util.h" | |
| 13 | |
| 14 namespace chromeos { | |
| 15 | |
| 16 UpdateObserver::UpdateObserver(Profile* profile) | |
| 17 : notification_(profile, "update.chromeos", IDR_NOTIFICATION_UPDATE, | |
| 18 l10n_util::GetStringUTF16(IDS_UPDATE_TITLE)) {} | |
| 19 | |
| 20 UpdateObserver::~UpdateObserver() { | |
| 21 notification_.Hide(); | |
| 22 } | |
| 23 | |
| 24 void UpdateObserver::UpdateStatusChanged(UpdateLibrary* library) { | |
| 25 #if 0 | |
| 26 // TODO seanparent@chromium.org : This update should only be shown when an | |
| 27 // update is critical and should include a restart button using the | |
| 28 // update_engine restart API. Currently removed entirely per Kan's request. | |
| 29 | |
| 30 if (library->status().status == UPDATE_STATUS_UPDATED_NEED_REBOOT) { | |
| 31 notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED), true); | |
| 32 } | |
| 33 #endif | |
| 34 } | |
| 35 | |
| 36 } // namespace chromeos | |
| OLD | NEW |