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

Unified Diff: ui/events/ozone/device/udev/device_manager_udev.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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/events/event_dispatcher_unittest.cc ('k') | ui/events/platform/platform_event_source_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/device/udev/device_manager_udev.cc
diff --git a/ui/events/ozone/device/udev/device_manager_udev.cc b/ui/events/ozone/device/udev/device_manager_udev.cc
index 432173dd6f2c95b6528f16f7c04226be7d903396..4207082953ef130af9e4e29b3ef560169d09ac31 100644
--- a/ui/events/ozone/device/udev/device_manager_udev.cc
+++ b/ui/events/ozone/device/udev/device_manager_udev.cc
@@ -158,7 +158,7 @@ scoped_ptr<DeviceEvent> DeviceManagerUdev::ProcessMessage(udev_device* device) {
device::udev_device_get_property_value(device, "SUBSYSTEM");
if (!path || !subsystem)
- return scoped_ptr<DeviceEvent>();
+ return nullptr;
DeviceEvent::DeviceType device_type;
if (!strcmp(subsystem, "input") &&
@@ -168,7 +168,7 @@ scoped_ptr<DeviceEvent> DeviceManagerUdev::ProcessMessage(udev_device* device) {
StartsWithASCII(path, "/dev/dri/card", true))
device_type = DeviceEvent::DISPLAY;
else
- return scoped_ptr<DeviceEvent>();
+ return nullptr;
DeviceEvent::ActionType action_type;
if (!action || !strcmp(action, "add"))
@@ -178,9 +178,9 @@ scoped_ptr<DeviceEvent> DeviceManagerUdev::ProcessMessage(udev_device* device) {
else if (!strcmp(action, "change"))
action_type = DeviceEvent::CHANGE;
else
- return scoped_ptr<DeviceEvent>();
+ return nullptr;
- return scoped_ptr<DeviceEvent>(
+ return make_scoped_ptr(
new DeviceEvent(device_type, action_type, base::FilePath(path)));
}
« no previous file with comments | « ui/events/event_dispatcher_unittest.cc ('k') | ui/events/platform/platform_event_source_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698