|
|
Chromium Code Reviews|
Created:
4 years ago by tbarzic Modified:
4 years ago Reviewers:
Marc Treib CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
Also, avoids "Single-parameter constructors should be marked explicit."
presubmit warning when changing chrome_permission_message_rules.cc file.
BUG=None
Committed: https://crrev.com/17a5691c4ef416b1390e769b966ebebfe3505171
Cr-Commit-Position: refs/heads/master@{#435667}
Patch Set 1 #
Total comments: 2
Messages
Total messages: 19 (13 generated)
The CQ bit was checked by tbarzic@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
BUG=None
==========
to
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
Additional benefit is there is no more presubmit warning when using {}
permission sets.
BUG=None
==========
Description was changed from
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
Additional benefit is there is no more presubmit warning when using {}
permission sets.
BUG=None
==========
to
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
Additional benefit is there is no more presubmit warning when using {}
permission ID sets.
BUG=None
==========
Description was changed from
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
Additional benefit is there is no more presubmit warning when using {}
permission ID sets.
BUG=None
==========
to
==========
Use initializer_list in ChromePermissionMessageRule ctors
This is cleaner than using
ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves
TODO associated with said class).
BUG=None
==========
Description was changed from ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). BUG=None ========== to ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). Also, avoids "Single-parameter constructors should be marked explicit." presubmit warning when changing chrome_permission_message_rules.cc file. BUG=None ==========
tbarzic@chromium.org changed reviewers: + treib@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_clobber_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
lgtm Awesome! https://codereview.chromium.org/2540613003/diff/1/chrome/common/extensions/pe... File chrome/common/extensions/permissions/chrome_permission_message_rules.h (right): https://codereview.chromium.org/2540613003/diff/1/chrome/common/extensions/pe... chrome/common/extensions/permissions/chrome_permission_message_rules.h:83: const std::initializer_list<APIPermission::ID>& optional); I'm not very familiar with initializer_lists yet - could all those just say std::set<APIPermission::ID>& (effectively converting from initializer_list to set one step earlier), to get rid of the somewhat ugly initializer_list type in the signature? Not a big deal though, especially since this is all private.
https://codereview.chromium.org/2540613003/diff/1/chrome/common/extensions/pe... File chrome/common/extensions/permissions/chrome_permission_message_rules.h (right): https://codereview.chromium.org/2540613003/diff/1/chrome/common/extensions/pe... chrome/common/extensions/permissions/chrome_permission_message_rules.h:83: const std::initializer_list<APIPermission::ID>& optional); On 2016/11/30 14:42:52, Marc Treib wrote: > I'm not very familiar with initializer_lists yet - could all those just say > std::set<APIPermission::ID>& (effectively converting from initializer_list to > set one step earlier), to get rid of the somewhat ugly initializer_list type in > the signature? > Not a big deal though, especially since this is all private. I was hoping to use std::set, too, but clang complains when {} is passed to the constructor with error: "chosen constructor is explicit in copy-initialization" (http://cplusplus.github.io/LWG/lwg-defects.html#2193 seems relevant). I guess it could be worked around by passing std:set<>() instead of {}, but this seems cleaner :)
The CQ bit was checked by tbarzic@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 1, "attempt_start_ts": 1480615290413880, "parent_rev":
"3911842e3867012c713a692f9937ec22080773ed", "commit_rev":
"cb06cc3223524c439a5d036fb65d4b36294bc411"}
Message was sent while issue was closed.
Description was changed from ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). Also, avoids "Single-parameter constructors should be marked explicit." presubmit warning when changing chrome_permission_message_rules.cc file. BUG=None ========== to ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). Also, avoids "Single-parameter constructors should be marked explicit." presubmit warning when changing chrome_permission_message_rules.cc file. BUG=None ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). Also, avoids "Single-parameter constructors should be marked explicit." presubmit warning when changing chrome_permission_message_rules.cc file. BUG=None ========== to ========== Use initializer_list in ChromePermissionMessageRule ctors This is cleaner than using ChromePermissionMessageRule::PermissionIDSetInitializer (and resolves TODO associated with said class). Also, avoids "Single-parameter constructors should be marked explicit." presubmit warning when changing chrome_permission_message_rules.cc file. BUG=None Committed: https://crrev.com/17a5691c4ef416b1390e769b966ebebfe3505171 Cr-Commit-Position: refs/heads/master@{#435667} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/17a5691c4ef416b1390e769b966ebebfe3505171 Cr-Commit-Position: refs/heads/master@{#435667} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
