commit | 32708b07f9d8acc1c5d5add3e3d86650cab25674 | [log] [tgz] |
---|---|---|
author | Devlin Cronin <rdevlin.cronin@chromium.org> | Wed Dec 05 17:58:04 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Dec 05 17:58:04 2018 |
tree | 9975e854b23d8a3ee2e481ecc75dac7376f2f35e | |
parent | 1dbf03d55fcedea4703c147a175da6b8d09d1297 [diff] |
[Extensions] Make BaseSetOperators<T> movable Make BaseSetOperators<T> (the base class for APIPermissionSet and ManifestPermissionSet) std::move-able. Also make copying the set require an explicit method call (Clone()) to ensure that it is only used when a copy is really required, encouraging callers to use std::move when possible. Finally, have the PermissionSet constructor accept APIPermissionSet and ManifestPermissionSet by value instead of by const& to cut down on copies. By a simple test, this cuts down on BaseSetOperators<T> copies by around 2x in the browser process on startup. Bug: 908536 Change-Id: I367dfbd4b4daee4e63475bf781e4eafb52b14d19 Reviewed-on: https://chromium-review.googlesource.com/c/1355844 Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Cr-Commit-Position: refs/heads/master@{#614022}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .