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

Side by Side Diff: ash/system/locale/locale_notification_controller.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/locale/locale_notification_controller.h" 5 #include "ash/system/locale/locale_notification_controller.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/system_notifier.h" 10 #include "ash/system/system_notifier.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 base::string16 to = l10n_util::GetDisplayNameForLocale( 94 base::string16 to = l10n_util::GetDisplayNameForLocale(
95 to_locale, cur_locale, true); 95 to_locale, cur_locale, true);
96 96
97 message_center::RichNotificationData optional; 97 message_center::RichNotificationData optional;
98 optional.buttons.push_back(message_center::ButtonInfo( 98 optional.buttons.push_back(message_center::ButtonInfo(
99 l10n_util::GetStringFUTF16( 99 l10n_util::GetStringFUTF16(
100 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from))); 100 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from)));
101 optional.never_timeout = true; 101 optional.never_timeout = true;
102 102
103 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 103 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
104 scoped_ptr<Notification> notification(new Notification( 104 std::unique_ptr<Notification> notification(new Notification(
105 message_center::NOTIFICATION_TYPE_SIMPLE, kLocaleChangeNotificationId, 105 message_center::NOTIFICATION_TYPE_SIMPLE, kLocaleChangeNotificationId,
106 base::string16() /* title */, 106 base::string16() /* title */,
107 l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, 107 l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE,
108 from, to), 108 from, to),
109 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_LOCALE), 109 bundle.GetImageNamed(IDR_AURA_UBER_TRAY_LOCALE),
110 base::string16() /* display_source */, GURL(), 110 base::string16() /* display_source */, GURL(),
111 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, 111 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
112 system_notifier::kNotifierLocale), 112 system_notifier::kNotifierLocale),
113 optional, new LocaleNotificationDelegate(delegate))); 113 optional, new LocaleNotificationDelegate(delegate)));
114 message_center::MessageCenter::Get()->AddNotification( 114 message_center::MessageCenter::Get()->AddNotification(
115 std::move(notification)); 115 std::move(notification));
116 } 116 }
117 117
118 } // namespace ash 118 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime_chromeos_unittest.cc ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698