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

Side by Side Diff: ui/events/ozone/device/udev/device_manager_udev.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "ui/events/ozone/device/udev/device_manager_udev.h" 5 #include "ui/events/ozone/device/udev/device_manager_udev.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DeviceEvent::ActionType action_type; 179 DeviceEvent::ActionType action_type;
180 if (!action || !strcmp(action, "add")) 180 if (!action || !strcmp(action, "add"))
181 action_type = DeviceEvent::ADD; 181 action_type = DeviceEvent::ADD;
182 else if (!strcmp(action, "remove")) 182 else if (!strcmp(action, "remove"))
183 action_type = DeviceEvent::REMOVE; 183 action_type = DeviceEvent::REMOVE;
184 else if (!strcmp(action, "change")) 184 else if (!strcmp(action, "change"))
185 action_type = DeviceEvent::CHANGE; 185 action_type = DeviceEvent::CHANGE;
186 else 186 else
187 return nullptr; 187 return nullptr;
188 188
189 return base::WrapUnique( 189 return base::MakeUnique<DeviceEvent>(device_type, action_type,
190 new DeviceEvent(device_type, action_type, base::FilePath(path))); 190 base::FilePath(path));
191 } 191 }
192 192
193 } // namespace ui 193 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/device/device_manager.cc ('k') | ui/events/ozone/evdev/event_converter_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698