|
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
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/641bb021db42cdfd711a97bdc16077c64bb87aea
Cr-Commit-Position: refs/heads/master@{#416174}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+128 lines, -134 lines) |
Patch |
 |
M |
content/browser/android/java/gin_java_bridge_dispatcher_host.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/android/overscroll_controller_android.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/appcache/appcache_request_handler_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/appcache/appcache_storage_impl_unittest.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/background_sync/background_sync_manager.cc
|
View
|
1
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/blob_storage/blob_url_request_job_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/bluetooth/frame_connected_bluetooth_devices_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/browser_main_loop.cc
|
View
|
1
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/cache_storage/cache_storage.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/cache_storage/cache_storage_blob_to_disk_cache_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/cache_storage/cache_storage_cache_unittest.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/gpu_process_transport_factory.cc
|
View
|
1
|
2 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/browser/compositor/reflector_impl_unittest.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/dom_storage/dom_storage_context_wrapper.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/download/download_request_core.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/fileapi/dragged_file_util_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/fileapi/transient_file_util_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/frame_tree_node.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/render_widget_host_view_child_frame.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/render_widget_host_view_guest.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/loader/async_revalidation_driver_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/loader/navigation_url_loader_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/loader/resource_dispatcher_host_impl.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/loader/upload_data_stream_builder.cc
|
View
|
|
3 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/browser/media/android/url_provision_fetcher.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/screen_capture_device_android.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/media/capture/web_contents_video_capture_device_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/notifications/platform_notification_context_impl.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/plugin_private_storage_helper.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/delegated_frame_host.cc
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/input/synthetic_pointer.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/media_stream_dispatcher_host.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool.cc
|
View
|
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/media/video_capture_controller.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_factory.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_impl.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_android.cc
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/resource_context_impl.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/embedded_worker_instance.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_browsertest.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_process_manager_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc
|
View
|
1
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_url_request_job_unittest.cc
|
View
|
1
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/service_worker_version_unittest.cc
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/storage_partition_impl_unittest.cc
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/streams/stream_url_request_job_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/webui/url_data_manager_backend.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 27 (17 generated)
|