blob: 60bd1e886e1be1cd97f3238ac3e574990c0e26ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/update_observer.h"
#include "app/l10n_util.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/time_format.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
namespace chromeos {
UpdateObserver::UpdateObserver(Profile* profile)
: notification_(profile, "update.chromeos", IDR_NOTIFICATION_UPDATE,
l10n_util::GetStringUTF16(IDS_UPDATE_TITLE)) {}
UpdateObserver::~UpdateObserver() {
notification_.Hide();
}
void UpdateObserver::UpdateStatusChanged(UpdateLibrary* library) {
#if 0
// TODO seanparent@chromium.org : This update should only be shown when an
// update is critical and should include a restart button using the
// update_engine restart API. Currently removed entirely per Kan's request.
if (library->status().status == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
notification_.Show(l10n_util::GetStringUTF16(IDS_UPDATE_COMPLETED), true);
}
#endif
}
} // namespace chromeos
|