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

Side by Side Diff: ash/system/chromeos/supervised/tray_supervised_user.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: address comments 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/chromeos/supervised/tray_supervised_user.h" 5 #include "ash/system/chromeos/supervised/tray_supervised_user.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/chromeos/label_tray_view.h" 10 #include "ash/system/chromeos/label_tray_view.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 !delegate->GetSupervisedUserManager().empty()) 89 !delegate->GetSupervisedUserManager().empty())
90 CreateOrUpdateSupervisedWarningNotification(); 90 CreateOrUpdateSupervisedWarningNotification();
91 91
92 status_ = status; 92 status_ = status;
93 is_user_supervised_ = is_user_supervised; 93 is_user_supervised_ = is_user_supervised;
94 } 94 }
95 95
96 void TraySupervisedUser::CreateOrUpdateNotification( 96 void TraySupervisedUser::CreateOrUpdateNotification(
97 const base::string16& new_message) { 97 const base::string16& new_message) {
98 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 98 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
99 scoped_ptr<Notification> notification( 99 std::unique_ptr<Notification> notification(
100 message_center::Notification::CreateSystemNotification( 100 message_center::Notification::CreateSystemNotification(
101 kNotificationId, base::string16() /* no title */, new_message, 101 kNotificationId, base::string16() /* no title */, new_message,
102 bundle.GetImageNamed(GetSupervisedUserIconId()), 102 bundle.GetImageNamed(GetSupervisedUserIconId()),
103 system_notifier::kNotifierSupervisedUser, 103 system_notifier::kNotifierSupervisedUser,
104 base::Closure() /* null callback */)); 104 base::Closure() /* null callback */));
105 message_center::MessageCenter::Get()->AddNotification( 105 message_center::MessageCenter::Get()->AddNotification(
106 std::move(notification)); 106 std::move(notification));
107 } 107 }
108 108
109 void TraySupervisedUser::CreateOrUpdateSupervisedWarningNotification() { 109 void TraySupervisedUser::CreateOrUpdateSupervisedWarningNotification() {
(...skipping 19 matching lines...) Expand all
129 129
130 // Not intended to be used for non-supervised users. 130 // Not intended to be used for non-supervised users.
131 CHECK(delegate->IsUserSupervised()); 131 CHECK(delegate->IsUserSupervised());
132 132
133 if (delegate->IsUserChild()) 133 if (delegate->IsUserChild())
134 return IDR_AURA_UBER_TRAY_CHILD_USER; 134 return IDR_AURA_UBER_TRAY_CHILD_USER;
135 return IDR_AURA_UBER_TRAY_SUPERVISED_USER; 135 return IDR_AURA_UBER_TRAY_SUPERVISED_USER;
136 } 136 }
137 137
138 } // namespace ash 138 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/session/tray_session_length_limit.cc ('k') | ash/system/chromeos/tray_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698