|
Re-write many calls to WrapUnique() with MakeUnique()
A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to
MakeUnique<Foo>(...). See the thread at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k
for background.
To avoid requiring too many manual fixups, the change skips some cases that are
frequently problematic. In particular, in methods named Foo::Method() it will
not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because
Foo::Method() may be accessing an internal constructor of Foo.
Cases where MakeUnique<NestedClass>(...) is called within a method of
OuterClass are common but hard to detect automatically, so have been fixed-up
manually.
The only types of manual fix ups applied are:
1) Revert MakeUnique back to WrapUnique
2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL
correctly)
3) Add base:: namespace qualifier where missing.
WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might
change behaviour if Foo does not have a user-defined constructor. For example,
WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>()
creates an integer initialised to 0.
git cl format has been been run over the CL. Spot-checking has uncovered no
cases of mis-formatting.
BUG= 637812
Committed: https://crrev.com/eb5cdbe2b1cb6dedbb51c544b0cc94b20984eadf
Cr-Commit-Position: refs/heads/master@{#413389}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+198 lines, -222 lines) |
Patch |
 |
M |
ui/app_list/search/mixer_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/app_list/views/app_list_view_unittest.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
ui/app_list/views/search_box_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/app_list/views/search_result_page_view.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/arc/notification/arc_notification_item.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/aura/window.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/base/ime/input_method_factory.cc
|
View
|
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
ui/base/ime/linux/fake_input_method_context_factory.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/base/nine_image_painter_factory.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
ui/compositor/layer_owner.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/compositor/test/in_process_context_factory.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/display/chromeos/update_display_configuration_task_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/event.cc
|
View
|
|
1 chunk |
+11 lines, -13 lines |
0 comments
|
Download
|
 |
M |
ui/events/event_processor_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/events/gestures/blink/web_gesture_curve_impl.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/device/device_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/device/udev/device_manager_udev.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/evdev/event_converter_test_util.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/evdev/event_factory_evdev.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/evdev/input_device_factory_evdev.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.cc
|
View
|
|
2 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/platform/platform_event_source.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/platform/x11/x11_event_source_glib.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/events/platform/x11/x11_event_source_libevent.cc
|
View
|
|
2 chunks |
+28 lines, -35 lines |
0 comments
|
Download
|
 |
M |
ui/events/test/event_generator.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/events/test/test_event_target.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/events/x/events_x_unittest.cc
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/gfx/image/image.cc
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/message_center/message_center_impl_unittest.cc
|
View
|
|
9 chunks |
+9 lines, -17 lines |
0 comments
|
Download
|
 |
M |
ui/message_center/message_center_tray.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/message_center/views/message_popup_collection_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/common/display_snapshot_proxy.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/common/native_display_delegate_ozone.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/demo/ozone_demo.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/caca/ozone_platform_caca.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/cast/client_native_pixmap_factory_cast.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/cast/overlay_manager_cast.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/cast/ozone_platform_cast.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/gpu/drm_thread.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/gpu/drm_thread_proxy.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/gpu/drm_window.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/gpu/screen_manager.cc
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/host/drm_display_host.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/host/drm_display_host_manager.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/host/drm_overlay_manager.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/drm/ozone_platform_gbm.cc
|
View
|
|
2 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/headless/ozone_platform_headless.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/wayland/fake_server.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/wayland/ozone_platform_wayland.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/wayland/wayland_connection.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/wayland/wayland_surface_factory.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/ozone/platform/x11/ozone_platform_x11.cc
|
View
|
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/touch_selection/touch_handle_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/touch_selection/touch_selection_controller_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/border.cc
|
View
|
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ui/views/controls/button/label_button.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/controls/button/md_text_button.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/controls/menu/menu_scroll_view_container.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/mus/native_widget_mus.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/mus/native_widget_mus_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/mus/views_mus_test_suite.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/mus/window_tree_host_mus.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/views/painter.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/views/style/mac/dialog_button_border_mac_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/style/platform_style.cc
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ui/views/style/platform_style_mac.mm
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ui/views/test/combobox_test_api.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/views/view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ui/wm/core/focus_controller_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 12 (7 generated)
|