Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1851)

Unified Diff: ash/system/tray_update.cc

Issue 10235010: Prepare SystemTray to support notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/system/tray_update.cc
diff --git a/ash/system/tray_update.cc b/ash/system/tray_update.cc
index 8d1399591a9bfd768662b64d8a1e63af33522f3c..f922dab649b9e68dba6b484d731b138033cfe45d 100644
--- a/ash/system/tray_update.cc
+++ b/ash/system/tray_update.cc
@@ -57,7 +57,8 @@ namespace ash {
namespace internal {
TrayUpdate::TrayUpdate()
- : TrayImageItem(IDR_AURA_UBER_TRAY_UPDATE) {
+ : TrayImageItem(IDR_AURA_UBER_TRAY_UPDATE),
+ default_(NULL) {
}
TrayUpdate::~TrayUpdate() {}
@@ -69,12 +70,13 @@ bool TrayUpdate::GetInitialVisibility() {
views::View* TrayUpdate::CreateDefaultView(user::LoginStatus status) {
if (!Shell::GetInstance()->tray_delegate()->SystemShouldUpgrade())
return NULL;
- default_.reset(new UpdateView);
- return default_.get();
+ DCHECK(default_ == NULL);
+ default_ = new UpdateView;
+ return default_;
}
void TrayUpdate::DestroyDefaultView() {
- default_.reset();
+ default_ = NULL;
}
void TrayUpdate::OnUpdateRecommended() {

Powered by Google App Engine
This is Rietveld 408576698