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

Unified Diff: ui/message_center/views/notification_view_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
« no previous file with comments | « ui/message_center/views/notification_view.cc ('k') | ui/message_center/views/notifier_settings_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/notification_view_unittest.cc
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index 9be249c55694256cc20263900556434174bbc9c3..bbdcfefbb4bdecbf59509291d0485f730ad7e1bc 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -4,8 +4,9 @@
#include "ui/message_center/views/notification_view.h"
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -34,16 +35,17 @@
namespace {
-scoped_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) {
+std::unique_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) {
ui::GestureEventDetails detail(type);
- scoped_ptr<ui::GestureEvent> event(
+ std::unique_ptr<ui::GestureEvent> event(
new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail));
return event;
}
-scoped_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent(int dx) {
+std::unique_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent(
+ int dx) {
ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0);
- scoped_ptr<ui::GestureEvent> event(
+ std::unique_ptr<ui::GestureEvent> event(
new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail));
return event;
}
@@ -83,7 +85,7 @@ class NotificationViewTest : public views::ViewsTestBase,
void ClickOnNotification(const std::string& notification_id) override;
void RemoveNotification(const std::string& notification_id,
bool by_user) override;
- scoped_ptr<ui::MenuModel> CreateMenuModel(
+ std::unique_ptr<ui::MenuModel> CreateMenuModel(
const NotifierId& notifier_id,
const base::string16& display_source) override;
bool HasClickedListener(const std::string& notification_id) override;
@@ -198,9 +200,9 @@ class NotificationViewTest : public views::ViewsTestBase,
private:
std::set<std::string> removed_ids_;
- scoped_ptr<RichNotificationData> data_;
- scoped_ptr<Notification> notification_;
- scoped_ptr<NotificationView> notification_view_;
+ std::unique_ptr<RichNotificationData> data_;
+ std::unique_ptr<Notification> notification_;
+ std::unique_ptr<NotificationView> notification_view_;
DISALLOW_COPY_AND_ASSIGN(NotificationViewTest);
};
@@ -256,7 +258,7 @@ void NotificationViewTest::RemoveNotification(
removed_ids_.insert(notification_id);
}
-scoped_ptr<ui::MenuModel> NotificationViewTest::CreateMenuModel(
+std::unique_ptr<ui::MenuModel> NotificationViewTest::CreateMenuModel(
const NotifierId& notifier_id,
const base::string16& display_source) {
// For this test, this method should not be invoked.
« no previous file with comments | « ui/message_center/views/notification_view.cc ('k') | ui/message_center/views/notifier_settings_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698