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

Side by Side Diff: ash/system/user/user_view.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/user/user_view.h" 5 #include "ash/system/user/user_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/multi_profile_uma.h" 10 #include "ash/multi_profile_uma.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 void UserView::AddLogoutButton(user::LoginStatus login) { 333 void UserView::AddLogoutButton(user::LoginStatus login) {
334 const base::string16 title = 334 const base::string16 title =
335 user::GetLocalizedSignOutStringForStatus(login, true); 335 user::GetLocalizedSignOutStringForStatus(login, true);
336 auto* logout_button = new TrayPopupLabelButton(this, title); 336 auto* logout_button = new TrayPopupLabelButton(this, title);
337 logout_button->SetAccessibleName(title); 337 logout_button->SetAccessibleName(title);
338 logout_button_ = logout_button; 338 logout_button_ = logout_button;
339 // In public account mode, the logout button border has a custom color. 339 // In public account mode, the logout button border has a custom color.
340 if (login == user::LOGGED_IN_PUBLIC) { 340 if (login == user::LOGGED_IN_PUBLIC) {
341 scoped_ptr<TrayPopupLabelButtonBorder> border( 341 std::unique_ptr<TrayPopupLabelButtonBorder> border(
342 new TrayPopupLabelButtonBorder()); 342 new TrayPopupLabelButtonBorder());
343 border->SetPainter(false, 343 border->SetPainter(false,
344 views::Button::STATE_NORMAL, 344 views::Button::STATE_NORMAL,
345 views::Painter::CreateImageGridPainter( 345 views::Painter::CreateImageGridPainter(
346 kPublicAccountLogoutButtonBorderImagesNormal)); 346 kPublicAccountLogoutButtonBorderImagesNormal));
347 border->SetPainter(false, 347 border->SetPainter(false,
348 views::Button::STATE_HOVERED, 348 views::Button::STATE_HOVERED,
349 views::Painter::CreateImageGridPainter( 349 views::Painter::CreateImageGridPainter(
350 kPublicAccountLogoutButtonBorderImagesHovered)); 350 kPublicAccountLogoutButtonBorderImagesHovered));
351 border->SetPainter(false, 351 border->SetPainter(false,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 focus_manager_ = NULL; 520 focus_manager_ = NULL;
521 if (user_card_view_->GetFocusManager()) 521 if (user_card_view_->GetFocusManager())
522 user_card_view_->GetFocusManager()->ClearFocus(); 522 user_card_view_->GetFocusManager()->ClearFocus();
523 popup_message_.reset(); 523 popup_message_.reset();
524 mouse_watcher_.reset(); 524 mouse_watcher_.reset();
525 add_menu_option_.reset(); 525 add_menu_option_.reset();
526 } 526 }
527 527
528 } // namespace tray 528 } // namespace tray
529 } // namespace ash 529 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698