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

Unified Diff: ash/system/chromeos/power/dual_role_notification.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 side-by-side diff with in-line comments
Download patch
Index: ash/system/chromeos/power/dual_role_notification.cc
diff --git a/ash/system/chromeos/power/dual_role_notification.cc b/ash/system/chromeos/power/dual_role_notification.cc
index 0c5cda0a000d354b8062a4fcae12f98c6a09d44a..c7aa8545ca500c8054c7604fc92af43c9cb24660 100644
--- a/ash/system/chromeos/power/dual_role_notification.cc
+++ b/ash/system/chromeos/power/dual_role_notification.cc
@@ -64,8 +64,8 @@ void DualRoleNotification::Update() {
std::string current_power_source_id = status.GetCurrentPowerSourceID();
- scoped_ptr<PowerStatus::PowerSource> new_source;
- scoped_ptr<PowerStatus::PowerSource> new_sink;
+ std::unique_ptr<PowerStatus::PowerSource> new_source;
+ std::unique_ptr<PowerStatus::PowerSource> new_sink;
size_t num_sinks_found = 0;
for (const auto& source : status.GetPowerSources()) {
// The power source can't be changed if there's a dedicated charger.
@@ -125,7 +125,7 @@ void DualRoleNotification::Update() {
}
}
-scoped_ptr<Notification> DualRoleNotification::CreateNotification() {
+std::unique_ptr<Notification> DualRoleNotification::CreateNotification() {
base::string16 title;
if (dual_role_source_) {
title = l10n_util::GetStringFUTF16(
@@ -140,7 +140,7 @@ scoped_ptr<Notification> DualRoleNotification::CreateNotification() {
IDS_ASH_STATUS_TRAY_CHARGING_DUAL_ROLE_DEVICES_TITLE);
}
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, kDualRoleNotificationId, title,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DUAL_ROLE_MESSAGE),
ui::ResourceBundle::GetSharedInstance().GetImageNamed(
« no previous file with comments | « ash/system/chromeos/power/dual_role_notification.h ('k') | ash/system/chromeos/power/power_event_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698