summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2016-02-26 13:08:55 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-26 21:12:37 +0000
commitacd23b71c788a2f93a6d553a6fa347610f577f7d (patch)
treea90cbe3856d7c162a6aaeda2a4995c49fb642f8f /net/base
parent780523e0eecff2a39c4428ea240c7551b9c0c7a2 (diff)
downloadchromium_src-acd23b71c788a2f93a6d553a6fa347610f577f7d.zip
chromium_src-acd23b71c788a2f93a6d553a6fa347610f577f7d.tar.gz
chromium_src-acd23b71c788a2f93a6d553a6fa347610f577f7d.tar.bz2
net: 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=agl@chromium.org, dcheng@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/1728333003 Cr-Commit-Position: refs/heads/master@{#377976}
Diffstat (limited to 'net/base')
-rw-r--r--net/base/ip_address.cc2
-rw-r--r--net/base/ip_address.h2
-rw-r--r--net/base/load_timing_info.cc2
-rw-r--r--net/base/load_timing_info.h1
-rw-r--r--net/base/network_interfaces.cc2
-rw-r--r--net/base/network_interfaces.h1
-rw-r--r--net/base/prioritized_dispatcher.cc2
-rw-r--r--net/base/prioritized_dispatcher.h1
8 files changed, 13 insertions, 0 deletions
diff --git a/net/base/ip_address.cc b/net/base/ip_address.cc
index f9565e5..170be40 100644
--- a/net/base/ip_address.cc
+++ b/net/base/ip_address.cc
@@ -17,6 +17,8 @@ IPAddress::IPAddress() {}
IPAddress::IPAddress(const IPAddressNumber& address) : ip_address_(address) {}
+IPAddress::IPAddress(const IPAddress& other) = default;
+
IPAddress::IPAddress(const uint8_t* address, size_t address_len)
: ip_address_(address, address + address_len) {}
diff --git a/net/base/ip_address.h b/net/base/ip_address.h
index f46eadb..f1f7480 100644
--- a/net/base/ip_address.h
+++ b/net/base/ip_address.h
@@ -29,6 +29,8 @@ class NET_EXPORT IPAddress {
// Creates an IP address from a deprecated IPAddressNumber.
explicit IPAddress(const IPAddressNumber& address);
+ IPAddress(const IPAddress& other);
+
// Copies the input address to |ip_address_|. The input is expected to be in
// network byte order.
template <size_t N>
diff --git a/net/base/load_timing_info.cc b/net/base/load_timing_info.cc
index ce4df2d..309e7b3 100644
--- a/net/base/load_timing_info.cc
+++ b/net/base/load_timing_info.cc
@@ -16,6 +16,8 @@ LoadTimingInfo::LoadTimingInfo() : socket_reused(false),
socket_log_id(NetLog::Source::kInvalidId) {
}
+LoadTimingInfo::LoadTimingInfo(const LoadTimingInfo& other) = default;
+
LoadTimingInfo::~LoadTimingInfo() {}
} // namespace net
diff --git a/net/base/load_timing_info.h b/net/base/load_timing_info.h
index 22a5908..8ee5a22 100644
--- a/net/base/load_timing_info.h
+++ b/net/base/load_timing_info.h
@@ -93,6 +93,7 @@ struct NET_EXPORT LoadTimingInfo {
};
LoadTimingInfo();
+ LoadTimingInfo(const LoadTimingInfo& other);
~LoadTimingInfo();
// True if the socket was reused. When true, DNS, connect, and SSL times
diff --git a/net/base/network_interfaces.cc b/net/base/network_interfaces.cc
index 6792fca..96a9ef4 100644
--- a/net/base/network_interfaces.cc
+++ b/net/base/network_interfaces.cc
@@ -37,6 +37,8 @@ NetworkInterface::NetworkInterface(const std::string& name,
ip_address_attributes(ip_address_attributes) {
}
+NetworkInterface::NetworkInterface(const NetworkInterface& other) = default;
+
NetworkInterface::~NetworkInterface() {
}
diff --git a/net/base/network_interfaces.h b/net/base/network_interfaces.h
index 09a085f..a4246e2 100644
--- a/net/base/network_interfaces.h
+++ b/net/base/network_interfaces.h
@@ -47,6 +47,7 @@ struct NET_EXPORT NetworkInterface {
const IPAddressNumber& address,
uint32_t prefix_length,
int ip_address_attributes);
+ NetworkInterface(const NetworkInterface& other);
~NetworkInterface();
std::string name;
diff --git a/net/base/prioritized_dispatcher.cc b/net/base/prioritized_dispatcher.cc
index b72f7a5..a6125a0 100644
--- a/net/base/prioritized_dispatcher.cc
+++ b/net/base/prioritized_dispatcher.cc
@@ -12,6 +12,8 @@ PrioritizedDispatcher::Limits::Limits(Priority num_priorities,
size_t total_jobs)
: total_jobs(total_jobs), reserved_slots(num_priorities) {}
+PrioritizedDispatcher::Limits::Limits(const Limits& other) = default;
+
PrioritizedDispatcher::Limits::~Limits() {}
PrioritizedDispatcher::PrioritizedDispatcher(const Limits& limits)
diff --git a/net/base/prioritized_dispatcher.h b/net/base/prioritized_dispatcher.h
index 8da8a1a..a0716cc 100644
--- a/net/base/prioritized_dispatcher.h
+++ b/net/base/prioritized_dispatcher.h
@@ -40,6 +40,7 @@ class NET_EXPORT_PRIVATE PrioritizedDispatcher {
// for priority 3 or above.
struct NET_EXPORT_PRIVATE Limits {
Limits(Priority num_priorities, size_t total_jobs);
+ Limits(const Limits& other);
~Limits();
// Total allowed running jobs.