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

Side by Side Diff: ash/system/tray_update.cc

Issue 14297013: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_item_view.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/tray_update.h" 5 #include "ash/system/tray_update.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (!Shell::GetInstance()->system_tray_delegate()->SystemShouldUpgrade()) 174 if (!Shell::GetInstance()->system_tray_delegate()->SystemShouldUpgrade())
175 return NULL; 175 return NULL;
176 return new UpdateView(severity_); 176 return new UpdateView(severity_);
177 } 177 }
178 178
179 views::View* TrayUpdate::CreateDetailedView(user::LoginStatus status) { 179 views::View* TrayUpdate::CreateDetailedView(user::LoginStatus status) {
180 return CreateDefaultView(status); 180 return CreateDefaultView(status);
181 } 181 }
182 182
183 void TrayUpdate::DestroyDetailedView() { 183 void TrayUpdate::DestroyDetailedView() {
184 if (nagger_.get()) { 184 if (nagger_) {
185 // The nagger was being displayed. Now that the detailed view is being 185 // The nagger was being displayed. Now that the detailed view is being
186 // closed, that means either the user clicks on it to restart, or the user 186 // closed, that means either the user clicks on it to restart, or the user
187 // didn't click on it to restart. In either case, start the timer to show 187 // didn't click on it to restart. In either case, start the timer to show
188 // the nag reminder again after the specified time. 188 // the nag reminder again after the specified time.
189 nagger_->RestartTimer(); 189 nagger_->RestartTimer();
190 } 190 }
191 } 191 }
192 192
193 void TrayUpdate::OnUpdateRecommended(UpdateObserver::UpdateSeverity severity) { 193 void TrayUpdate::OnUpdateRecommended(UpdateObserver::UpdateSeverity severity) {
194 severity_ = severity; 194 severity_ = severity;
195 SetImageFromResourceId(DecideResource(severity_, false)); 195 SetImageFromResourceId(DecideResource(severity_, false));
196 tray_view()->SetVisible(true); 196 tray_view()->SetVisible(true);
197 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() && 197 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() &&
198 !nagger_.get()) { 198 !nagger_.get()) {
199 // The shelf is not visible, and there is no nagger scheduled. 199 // The shelf is not visible, and there is no nagger scheduled.
200 nagger_.reset(new tray::UpdateNagger(this)); 200 nagger_.reset(new tray::UpdateNagger(this));
201 } 201 }
202 } 202 }
203 203
204 } // namespace internal 204 } // namespace internal
205 } // namespace ash 205 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_item_view.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698