Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(124)

Issue 2253233004: Re-write many calls to WrapUnique() with MakeUnique() (Closed)

Created:
3 years, 10 months ago by Adam Rice
Modified:
3 years, 10 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, posciak+watch_chromium.org, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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/68860bd0684a7cfdc2bf07ff768bd540a60a6e9e Cr-Commit-Position: refs/heads/master@{#413390}

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -159 lines) Patch
M remoting/base/chromium_url_request.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/chromoting_client.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M remoting/client/dual_buffer_frame_consumer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/client/gl_desktop.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/gl_renderer_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M remoting/client/jni/chromoting_jni_instance.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M remoting/client/jni/chromoting_jni_runtime.cc View 1 chunk +1 line, -2 lines 0 comments Download
M remoting/client/jni/jni_gl_display_handler.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M remoting/client/plugin/chromoting_instance.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/client/plugin/pepper_port_allocator_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/client/plugin/pepper_url_request.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/client/software_video_renderer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/basic_desktop_environment.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/client_session.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M remoting/host/continue_window_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/continue_window_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/continue_window_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/continue_window_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/continue_window_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/desktop_session_agent.cc View 7 chunks +18 lines, -18 lines 0 comments Download
M remoting/host/desktop_session_proxy.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M remoting/host/desktop_session_win.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M remoting/host/disconnect_window_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/disconnect_window_chromeos.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/disconnect_window_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/disconnect_window_mac.mm View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/disconnect_window_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/fake_desktop_environment.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/host/fake_host_extension.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/ipc_desktop_environment.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/mouse_cursor_monitor_proxy_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M remoting/host/pairing_registry_delegate_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/pairing_registry_delegate_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/pam_authorization_factory_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/remoting_me2me_host.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M remoting/host/setup/host_starter.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M remoting/host/setup/me2me_native_messaging_host_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/token_validator_factory_impl.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M remoting/host/token_validator_factory_impl_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M remoting/host/win/session_desktop_environment.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/authenticator.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/chromium_port_allocator_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/connection_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/fake_authenticator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/fake_video_renderer.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/http_ice_config_request_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/ice_transport_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M remoting/protocol/negotiating_authenticator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/pairing_registry_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/protocol/stream_message_pipe_adapter.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/transport_context.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/video_frame_pump.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M remoting/protocol/video_frame_pump_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/webrtc_transport.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M remoting/signaling/server_log_entry.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/signaling/xmpp_signal_strategy_unittest.cc View 6 chunks +10 lines, -11 lines 0 comments Download
M remoting/test/fake_port_allocator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/test/protocol_perftest.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/test/test_chromoting_client.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M remoting/test/test_chromoting_client_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
Adam Rice
3 years, 10 months ago (2016-08-19 12:38:45 UTC) #10
Sergey Ulanov
lgtm
3 years, 10 months ago (2016-08-19 17:05:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2253233004/20001
3 years, 10 months ago (2016-08-22 01:53:32 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 10 months ago (2016-08-22 02:49:12 UTC) #14
commit-bot: I haz the power
3 years, 10 months ago (2016-08-22 02:50:26 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/68860bd0684a7cfdc2bf07ff768bd540a60a6e9e
Cr-Commit-Position: refs/heads/master@{#413390}

Powered by Google App Engine
This is Rietveld 408576698