diff options
author | vmpstr <vmpstr@chromium.org> | 2016-02-26 17:21:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-27 01:23:32 +0000 |
commit | 3edc914481ff715869bd27903f2f9884e6d017da (patch) | |
tree | 2a63bf039e1c2d2768a9bb1955c77843d880b1e8 /extensions/common/permissions | |
parent | fa093a8177047c4275f104122b823950d1699d45 (diff) | |
download | chromium_src-3edc914481ff715869bd27903f2f9884e6d017da.zip chromium_src-3edc914481ff715869bd27903f2f9884e6d017da.tar.gz chromium_src-3edc914481ff715869bd27903f2f9884e6d017da.tar.bz2 |
extensions: Add out-of-line copy ctors for complex classes.
This patch adds out of line copy constructors for classes that our
clang-plugin considers heavy. This is an effort to enable copy
constructor checks by default.
BUG=436357
R=reillyg@chromium.org, dcheng@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1724293002
Cr-Commit-Position: refs/heads/master@{#378054}
Diffstat (limited to 'extensions/common/permissions')
4 files changed, 6 insertions, 0 deletions
diff --git a/extensions/common/permissions/api_permission_set.cc b/extensions/common/permissions/api_permission_set.cc index 164390b..0e48d2f 100644 --- a/extensions/common/permissions/api_permission_set.cc +++ b/extensions/common/permissions/api_permission_set.cc @@ -197,6 +197,8 @@ PermissionID::~PermissionID() { PermissionIDSet::PermissionIDSet() { } +PermissionIDSet::PermissionIDSet(const PermissionIDSet& other) = default; + PermissionIDSet::~PermissionIDSet() { } diff --git a/extensions/common/permissions/api_permission_set.h b/extensions/common/permissions/api_permission_set.h index c913466..e64d519 100644 --- a/extensions/common/permissions/api_permission_set.h +++ b/extensions/common/permissions/api_permission_set.h @@ -117,6 +117,7 @@ class PermissionIDSet { using const_iterator = std::set<PermissionID>::const_iterator; PermissionIDSet(); + PermissionIDSet(const PermissionIDSet& other); virtual ~PermissionIDSet(); // Adds the given permission, and an optional parameter, to the set. diff --git a/extensions/common/permissions/permission_message.cc b/extensions/common/permissions/permission_message.cc index 416b6c9..83553e6 100644 --- a/extensions/common/permissions/permission_message.cc +++ b/extensions/common/permissions/permission_message.cc @@ -16,6 +16,8 @@ PermissionMessage::PermissionMessage( const std::vector<base::string16>& submessages) : message_(message), permissions_(permissions), submessages_(submessages) {} +PermissionMessage::PermissionMessage(const PermissionMessage& other) = default; + PermissionMessage::~PermissionMessage() {} } // namespace extensions diff --git a/extensions/common/permissions/permission_message.h b/extensions/common/permissions/permission_message.h index bdb053a..28f1f15 100644 --- a/extensions/common/permissions/permission_message.h +++ b/extensions/common/permissions/permission_message.h @@ -44,6 +44,7 @@ class PermissionMessage { PermissionMessage(const base::string16& message, const PermissionIDSet& permissions, const std::vector<base::string16>& submessages); + PermissionMessage(const PermissionMessage& other); virtual ~PermissionMessage(); const base::string16& message() const { return message_; } |