summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2016-02-26 17:21:52 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-27 01:23:32 +0000
commit3edc914481ff715869bd27903f2f9884e6d017da (patch)
tree2a63bf039e1c2d2768a9bb1955c77843d880b1e8 /extensions/common
parentfa093a8177047c4275f104122b823950d1699d45 (diff)
downloadchromium_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')
-rw-r--r--extensions/common/event_filtering_info.cc3
-rw-r--r--extensions/common/event_filtering_info.h1
-rw-r--r--extensions/common/extension_icon_set.cc2
-rw-r--r--extensions/common/extension_icon_set.h1
-rw-r--r--extensions/common/extension_messages.cc6
-rw-r--r--extensions/common/extension_messages.h3
-rw-r--r--extensions/common/extension_resource.cc2
-rw-r--r--extensions/common/extension_resource.h2
-rw-r--r--extensions/common/manifest_handlers/file_handler_info.cc1
-rw-r--r--extensions/common/manifest_handlers/file_handler_info.h1
-rw-r--r--extensions/common/permissions/api_permission_set.cc2
-rw-r--r--extensions/common/permissions/api_permission_set.h1
-rw-r--r--extensions/common/permissions/permission_message.cc2
-rw-r--r--extensions/common/permissions/permission_message.h1
-rw-r--r--extensions/common/update_manifest.cc2
-rw-r--r--extensions/common/update_manifest.h1
-rw-r--r--extensions/common/url_pattern.cc2
-rw-r--r--extensions/common/url_pattern.h1
-rw-r--r--extensions/common/user_script.cc4
-rw-r--r--extensions/common/user_script.h2
20 files changed, 40 insertions, 0 deletions
diff --git a/extensions/common/event_filtering_info.cc b/extensions/common/event_filtering_info.cc
index 3c39864..a426e1b 100644
--- a/extensions/common/event_filtering_info.cc
+++ b/extensions/common/event_filtering_info.cc
@@ -18,6 +18,9 @@ EventFilteringInfo::EventFilteringInfo()
has_window_type_(false),
has_window_exposed_by_default_(false) {}
+EventFilteringInfo::EventFilteringInfo(const EventFilteringInfo& other) =
+ default;
+
EventFilteringInfo::~EventFilteringInfo() {
}
diff --git a/extensions/common/event_filtering_info.h b/extensions/common/event_filtering_info.h
index 3058110..aaa03a4 100644
--- a/extensions/common/event_filtering_info.h
+++ b/extensions/common/event_filtering_info.h
@@ -25,6 +25,7 @@ namespace extensions {
class EventFilteringInfo {
public:
EventFilteringInfo();
+ EventFilteringInfo(const EventFilteringInfo& other);
~EventFilteringInfo();
void SetWindowExposedByDefault(bool exposed);
void SetWindowType(const std::string& window_type);
diff --git a/extensions/common/extension_icon_set.cc b/extensions/common/extension_icon_set.cc
index 221f32f..421407c 100644
--- a/extensions/common/extension_icon_set.cc
+++ b/extensions/common/extension_icon_set.cc
@@ -10,6 +10,8 @@
ExtensionIconSet::ExtensionIconSet() {}
+ExtensionIconSet::ExtensionIconSet(const ExtensionIconSet& other) = default;
+
ExtensionIconSet::~ExtensionIconSet() {}
void ExtensionIconSet::Clear() {
diff --git a/extensions/common/extension_icon_set.h b/extensions/common/extension_icon_set.h
index e491b72..91ce0f5 100644
--- a/extensions/common/extension_icon_set.h
+++ b/extensions/common/extension_icon_set.h
@@ -28,6 +28,7 @@ class ExtensionIconSet {
typedef std::map<int, std::string> IconMap;
ExtensionIconSet();
+ ExtensionIconSet(const ExtensionIconSet& other);
~ExtensionIconSet();
const IconMap& map() const { return map_; }
diff --git a/extensions/common/extension_messages.cc b/extensions/common/extension_messages.cc
index d6ab4f2..c648b28 100644
--- a/extensions/common/extension_messages.cc
+++ b/extensions/common/extension_messages.cc
@@ -35,6 +35,9 @@ ExtensionMsg_PermissionSetStruct::ExtensionMsg_PermissionSetStruct(
scriptable_hosts(permissions.scriptable_hosts()) {
}
+ExtensionMsg_PermissionSetStruct::ExtensionMsg_PermissionSetStruct(
+ const ExtensionMsg_PermissionSetStruct& other) = default;
+
ExtensionMsg_PermissionSetStruct::~ExtensionMsg_PermissionSetStruct() {
}
@@ -70,6 +73,9 @@ ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params(
}
}
+ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params(
+ const ExtensionMsg_Loaded_Params& other) = default;
+
scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension(
std::string* error) const {
scoped_refptr<Extension> extension =
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index 5125941..54f1433 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -249,6 +249,8 @@ struct ExtensionMsg_PermissionSetStruct {
ExtensionMsg_PermissionSetStruct();
explicit ExtensionMsg_PermissionSetStruct(
const extensions::PermissionSet& permissions);
+ ExtensionMsg_PermissionSetStruct(
+ const ExtensionMsg_PermissionSetStruct& other);
~ExtensionMsg_PermissionSetStruct();
scoped_ptr<const extensions::PermissionSet> ToPermissionSet() const;
@@ -264,6 +266,7 @@ struct ExtensionMsg_Loaded_Params {
~ExtensionMsg_Loaded_Params();
ExtensionMsg_Loaded_Params(const extensions::Extension* extension,
bool include_tab_permissions);
+ ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other);
// Creates a new extension from the data in this object.
scoped_refptr<extensions::Extension> ConvertToExtension(
diff --git a/extensions/common/extension_resource.cc b/extensions/common/extension_resource.cc
index e1eaa3c..fea9286 100644
--- a/extensions/common/extension_resource.cc
+++ b/extensions/common/extension_resource.cc
@@ -24,6 +24,8 @@ ExtensionResource::ExtensionResource(const std::string& extension_id,
follow_symlinks_anywhere_(false) {
}
+ExtensionResource::ExtensionResource(const ExtensionResource& other) = default;
+
ExtensionResource::~ExtensionResource() {}
void ExtensionResource::set_follow_symlinks_anywhere() {
diff --git a/extensions/common/extension_resource.h b/extensions/common/extension_resource.h
index 806889e..43281cc 100644
--- a/extensions/common/extension_resource.h
+++ b/extensions/common/extension_resource.h
@@ -30,6 +30,8 @@ class ExtensionResource {
const base::FilePath& extension_root,
const base::FilePath& relative_path);
+ ExtensionResource(const ExtensionResource& other);
+
~ExtensionResource();
// set_follow_symlinks_anywhere allows the resource to be a symlink to
diff --git a/extensions/common/manifest_handlers/file_handler_info.cc b/extensions/common/manifest_handlers/file_handler_info.cc
index b525c14..c95a5e4 100644
--- a/extensions/common/manifest_handlers/file_handler_info.cc
+++ b/extensions/common/manifest_handlers/file_handler_info.cc
@@ -26,6 +26,7 @@ const char kNotRecognized[] = "'%s' is not a recognized file handler property.";
}
FileHandlerInfo::FileHandlerInfo() : include_directories(false) {}
+FileHandlerInfo::FileHandlerInfo(const FileHandlerInfo& other) = default;
FileHandlerInfo::~FileHandlerInfo() {}
FileHandlers::FileHandlers() {}
diff --git a/extensions/common/manifest_handlers/file_handler_info.h b/extensions/common/manifest_handlers/file_handler_info.h
index ac9e51d..90de31c 100644
--- a/extensions/common/manifest_handlers/file_handler_info.h
+++ b/extensions/common/manifest_handlers/file_handler_info.h
@@ -17,6 +17,7 @@ namespace extensions {
struct FileHandlerInfo {
FileHandlerInfo();
+ FileHandlerInfo(const FileHandlerInfo& other);
~FileHandlerInfo();
// The id of this handler.
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_; }
diff --git a/extensions/common/update_manifest.cc b/extensions/common/update_manifest.cc
index 57162da..c8ebdf7 100644
--- a/extensions/common/update_manifest.cc
+++ b/extensions/common/update_manifest.cc
@@ -23,6 +23,8 @@ UpdateManifest::Result::Result()
: size(0),
diff_size(0) {}
+UpdateManifest::Result::Result(const Result& other) = default;
+
UpdateManifest::Result::~Result() {}
UpdateManifest::Results::Results() : daystart_elapsed_seconds(kNoDaystart) {}
diff --git a/extensions/common/update_manifest.h b/extensions/common/update_manifest.h
index d2b1be4..6761a39 100644
--- a/extensions/common/update_manifest.h
+++ b/extensions/common/update_manifest.h
@@ -42,6 +42,7 @@ class UpdateManifest {
// The result of parsing one <app> tag in an xml update check manifest.
struct Result {
Result();
+ Result(const Result& other);
~Result();
std::string extension_id;
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 0be7aba..a74c864 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -151,6 +151,8 @@ URLPattern::URLPattern(int valid_schemes, const std::string& pattern)
NOTREACHED() << "URLPattern invalid: " << pattern << " result " << result;
}
+URLPattern::URLPattern(const URLPattern& other) = default;
+
URLPattern::~URLPattern() {
}
diff --git a/extensions/common/url_pattern.h b/extensions/common/url_pattern.h
index c58c3ef..bcdc7f6 100644
--- a/extensions/common/url_pattern.h
+++ b/extensions/common/url_pattern.h
@@ -90,6 +90,7 @@ class URLPattern {
URLPattern(int valid_schemes, const std::string& pattern);
URLPattern();
+ URLPattern(const URLPattern& other);
~URLPattern();
bool operator<(const URLPattern& other) const;
diff --git a/extensions/common/user_script.cc b/extensions/common/user_script.cc
index 0bb3c8d..20bff9f 100644
--- a/extensions/common/user_script.cc
+++ b/extensions/common/user_script.cc
@@ -82,6 +82,8 @@ UserScript::File::File(const base::FilePath& extension_root,
UserScript::File::File() {}
+UserScript::File::File(const File& other) = default;
+
UserScript::File::~File() {}
UserScript::UserScript()
@@ -93,6 +95,8 @@ UserScript::UserScript()
match_about_blank_(false),
incognito_enabled_(false) {}
+UserScript::UserScript(const UserScript& other) = default;
+
UserScript::~UserScript() {
}
diff --git a/extensions/common/user_script.h b/extensions/common/user_script.h
index 8bf16bf..40ad330 100644
--- a/extensions/common/user_script.h
+++ b/extensions/common/user_script.h
@@ -80,6 +80,7 @@ class UserScript {
const base::FilePath& relative_path,
const GURL& url);
File();
+ File(const File& other);
~File();
const base::FilePath& extension_root() const { return extension_root_; }
@@ -133,6 +134,7 @@ class UserScript {
// Constructor. Default the run location to document end, which is like
// Greasemonkey and probably more useful for typical scripts.
UserScript();
+ UserScript(const UserScript& other);
~UserScript();
const std::string& name_space() const { return name_space_; }