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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 months, 1 week ago by Adam Rice
Modified:
10 months, 3 weeks ago
Reviewers:
Tim Song
CC:
chromium-reviews
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/9b4b8464d50e235b25ceb2872d44d09a258837f2 Cr-Commit-Position: refs/heads/master@{#416203}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -81 lines) Patch
M components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_connection_unittest.cc View 5 chunks +14 lines, -14 lines 0 comments Download
M components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection_unittest.cc View 7 chunks +16 lines, -16 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_client_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_device_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_device_manager_unittest.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_enrollment_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/cryptauth/cryptauth_enrollment_manager_unittest.cc View 4 chunks +8 lines, -8 lines 0 comments Download
M components/proximity_auth/cryptauth/sync_scheduler_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/cryptauth_enroller_factory_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/device_to_device_authenticator.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M components/proximity_auth/device_to_device_authenticator_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/device_to_device_secure_context_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M components/proximity_auth/fake_connection.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/proximity_auth/messenger_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/proximity_auth/messenger_impl_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/proximity_auth/remote_device_life_cycle_impl.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M components/proximity_auth/throttled_bluetooth_connection_finder_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/proximity_auth/unlock_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/proximity_auth/webui/proximity_auth_webui_handler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
Trybot results:  chromium_presubmit   linux_chromium_chromeos_rel_ng   linux_chromium_chromeos_rel_ng   chromium_presubmit   linux_chromium_chromeos_rel_ng   win_clang   win_chromium_x64_rel_ng   win_chromium_compile_dbg_ng   win_chromium_rel_ng   mac_chromium_compile_dbg_ng   ios-device   mac_chromium_rel_ng   ios-simulator   linux_android_rel_ng   cast_shell_android   android_clang_dbg_recipe   android_arm64_dbg_recipe   android_compile_dbg   linux_chromium_rel_ng   linux_chromium_asan_rel_ng   linux_chromium_chromeos_compile_dbg_ng   chromium_presubmit   chromeos_x86-generic_chromium_compile_only_ng   chromeos_amd64-generic_chromium_compile_only_ng   linux_chromium_compile_dbg_ng   chromeos_daisy_chromium_compile_only_ng   cast_shell_linux   linux_chromium_chromeos_ozone_rel_ng   linux_chromium_clobber_rel_ng   linux_chromium_chromeos_rel_ng   win_chromium_rel_ng   win_clang   win_chromium_compile_dbg_ng   win_chromium_x64_rel_ng   win_chromium_rel_ng   mac_chromium_compile_dbg_ng   ios-device   ios-simulator   mac_chromium_rel_ng   linux_android_rel_ng   android_clang_dbg_recipe   cast_shell_android   android_arm64_dbg_recipe   linux_chromium_chromeos_compile_dbg_ng   android_compile_dbg   linux_chromium_asan_rel_ng   linux_chromium_rel_ng   chromium_presubmit   chromeos_x86-generic_chromium_compile_only_ng   linux_chromium_compile_dbg_ng   chromeos_amd64-generic_chromium_compile_only_ng   cast_shell_linux   linux_chromium_chromeos_ozone_rel_ng   chromeos_daisy_chromium_compile_only_ng   linux_chromium_chromeos_rel_ng   linux_chromium_clobber_rel_ng 
Commit queue not available (can’t edit this change).

Messages

Total messages: 21 (10 generated)
Adam Rice
11 months ago (2016-08-19 08:00:02 UTC) #6
Adam Rice
ping
10 months, 3 weeks ago (2016-08-29 07:05:01 UTC) #7
Adam Rice
ping tbarzic Do you want me to re-assign?
10 months, 3 weeks ago (2016-08-31 08:19:01 UTC) #8
tbarzic
Sorry, I missed this one (and haven't had much internet access last week or so) ...
10 months, 3 weeks ago (2016-08-31 10:22:16 UTC) #9
Adam Rice
-tbarzic, +tengs
10 months, 3 weeks ago (2016-09-01 02:29:27 UTC) #11
Tim Song
lgtm
10 months, 3 weeks ago (2016-09-01 22:38:16 UTC) #12
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/2250023005/1
10 months, 3 weeks ago (2016-09-02 03:19:41 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/271958)
10 months, 3 weeks ago (2016-09-02 05:24:34 UTC) #16
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/2250023005/1
10 months, 3 weeks ago (2016-09-02 06:14:23 UTC) #18
commit-bot: I haz the power
Committed patchset #1 (id:1)
10 months, 3 weeks ago (2016-09-02 06:44:57 UTC) #19
commit-bot: I haz the power
10 months, 3 weeks ago (2016-09-02 06:46:24 UTC) #21
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9b4b8464d50e235b25ceb2872d44d09a258837f2
Cr-Commit-Position: refs/heads/master@{#416203}
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 25c286973