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

Issue 2308473002: ui/PRESUBMIT.py: Recommend MakeUnique() before WrapUnique() (Closed)

Created:
4 years, 3 months ago by Adam Rice
Modified:
4 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui/PRESUBMIT.py: Recommend MakeUnique() before WrapUnique() MakeUnique() is preferred to WrapUnique() in most cases. See chromium-dev thread at https://groups.google.com/a/chromium.org/d/msg/chromium-dev/iQgMedVA8-k/u7HSaY4KCwAJ Modify the presubmit to recommend MakeUnique<T>() before WrapUnique() when it encounters the unique_ptr constructor used in an rvalue context. MakeUnique() cannot be used in every case where WrapUnique() can, so continue to mention WrapUnique(). R=sky BUG= Committed: https://crrev.com/4376826e1edeb5f8c64df649aa2f0c0bb4597f21 Cr-Commit-Position: refs/heads/master@{#416830}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Mention WrapUnique as well as MakeUnique #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M ui/PRESUBMIT.py View 1 1 chunk +2 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 15 (8 generated)
Adam Rice
4 years, 3 months ago (2016-09-02 06:28:00 UTC) #1
sky
https://codereview.chromium.org/2308473002/diff/1/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/2308473002/diff/1/ui/PRESUBMIT.py#newcode34 ui/PRESUBMIT.py:34: 'Use base::MakeUnique<T>() instead.') % This wording is not correct ...
4 years, 3 months ago (2016-09-02 14:17:44 UTC) #6
Adam Rice
https://codereview.chromium.org/2308473002/diff/1/ui/PRESUBMIT.py File ui/PRESUBMIT.py (right): https://codereview.chromium.org/2308473002/diff/1/ui/PRESUBMIT.py#newcode34 ui/PRESUBMIT.py:34: 'Use base::MakeUnique<T>() instead.') % On 2016/09/02 14:17:44, sky wrote: ...
4 years, 3 months ago (2016-09-05 06:46:05 UTC) #7
sky
LGTM
4 years, 3 months ago (2016-09-06 18:17:42 UTC) #8
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/2308473002/20001
4 years, 3 months ago (2016-09-07 02:16:07 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-07 03:03:18 UTC) #13
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 03:04:45 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4376826e1edeb5f8c64df649aa2f0c0bb4597f21
Cr-Commit-Position: refs/heads/master@{#416830}

Powered by Google App Engine
This is Rietveld 408576698