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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
index c12564c41f8169f89289117a70610203079dc41c..a5be6fd3bfc6347a554e404e31e8b4ae5412af07 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
@@ -1041,7 +1041,7 @@ void GesturePropertyProvider::ParseXorgConfFile(const std::string& content) {
for (size_t i = 0; i < sections.size(); ++i) {
// Create a new configuration section.
configurations_.push_back(
- base::WrapUnique(new internal::ConfigurationSection()));
+ base::MakeUnique<internal::ConfigurationSection>());
internal::ConfigurationSection* config = configurations_.back().get();
// Break the section into lines.
@@ -1197,17 +1197,17 @@ GesturePropertyProvider::CreateMatchCriteria(const std::string& match_type,
const std::string& arg) {
DVLOG(2) << "Creating match criteria: (" << match_type << ", " << arg << ")";
if (match_type == "MatchProduct")
- return base::WrapUnique(new internal::MatchProduct(arg));
+ return base::MakeUnique<internal::MatchProduct>(arg);
if (match_type == "MatchDevicePath")
- return base::WrapUnique(new internal::MatchDevicePath(arg));
+ return base::MakeUnique<internal::MatchDevicePath>(arg);
if (match_type == "MatchUSBID")
- return base::WrapUnique(new internal::MatchUSBID(arg));
+ return base::MakeUnique<internal::MatchUSBID>(arg);
if (match_type == "MatchIsPointer")
- return base::WrapUnique(new internal::MatchIsPointer(arg));
+ return base::MakeUnique<internal::MatchIsPointer>(arg);
if (match_type == "MatchIsTouchpad")
- return base::WrapUnique(new internal::MatchIsTouchpad(arg));
+ return base::MakeUnique<internal::MatchIsTouchpad>(arg);
if (match_type == "MatchIsTouchscreen")
- return base::WrapUnique(new internal::MatchIsTouchscreen(arg));
+ return base::MakeUnique<internal::MatchIsTouchscreen>(arg);
NOTREACHED();
return NULL;
}
« no previous file with comments | « ui/events/ozone/evdev/input_device_factory_evdev.cc ('k') | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698