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/browser/api | |
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/browser/api')
24 files changed, 46 insertions, 0 deletions
diff --git a/extensions/browser/api/alarms/alarm_manager.cc b/extensions/browser/api/alarms/alarm_manager.cc index 4f9aeda..0616481 100644 --- a/extensions/browser/api/alarms/alarm_manager.cc +++ b/extensions/browser/api/alarms/alarm_manager.cc @@ -465,6 +465,8 @@ Alarm::Alarm(const std::string& name, } } +Alarm::Alarm(const Alarm& other) = default; + Alarm::~Alarm() { } diff --git a/extensions/browser/api/alarms/alarm_manager.h b/extensions/browser/api/alarms/alarm_manager.h index a93c59f..66e5fb1 100644 --- a/extensions/browser/api/alarms/alarm_manager.h +++ b/extensions/browser/api/alarms/alarm_manager.h @@ -38,6 +38,7 @@ struct Alarm { const api::alarms::AlarmCreateInfo& create_info, base::TimeDelta min_granularity, base::Time now); + Alarm(const Alarm& other); ~Alarm(); linked_ptr<api::alarms::Alarm> js_alarm; diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc index 4d54ee0..d6185db 100644 --- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc +++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc @@ -97,6 +97,9 @@ BluetoothSocketEventDispatcher::~BluetoothSocketEventDispatcher() {} BluetoothSocketEventDispatcher::SocketParams::SocketParams() {} +BluetoothSocketEventDispatcher::SocketParams::SocketParams( + const SocketParams& other) = default; + BluetoothSocketEventDispatcher::SocketParams::~SocketParams() {} void BluetoothSocketEventDispatcher::OnSocketConnect( diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h index e64336b..5e45fc0 100644 --- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h +++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h @@ -64,6 +64,7 @@ class BluetoothSocketEventDispatcher // StartAccept(). struct SocketParams { SocketParams(); + SocketParams(const SocketParams& other); ~SocketParams(); content::BrowserThread::ID thread_id; diff --git a/extensions/browser/api/cast_channel/cast_transport.cc b/extensions/browser/api/cast_channel/cast_transport.cc index 9572f3b..8a22af6 100644 --- a/extensions/browser/api/cast_channel/cast_transport.cc +++ b/extensions/browser/api/cast_channel/cast_transport.cc @@ -197,6 +197,9 @@ CastTransportImpl::WriteRequest::WriteRequest( payload.size()); } +CastTransportImpl::WriteRequest::WriteRequest(const WriteRequest& other) = + default; + CastTransportImpl::WriteRequest::~WriteRequest() { } diff --git a/extensions/browser/api/cast_channel/cast_transport.h b/extensions/browser/api/cast_channel/cast_transport.h index e08216e..740bd5f 100644 --- a/extensions/browser/api/cast_channel/cast_transport.h +++ b/extensions/browser/api/cast_channel/cast_transport.h @@ -125,6 +125,7 @@ class CastTransportImpl : public CastTransport, public base::NonThreadSafe { explicit WriteRequest(const std::string& namespace_, const std::string& payload, const net::CompletionCallback& callback); + WriteRequest(const WriteRequest& other); ~WriteRequest(); // Namespace of the serialized message. diff --git a/extensions/browser/api/document_scan/document_scan_interface.cc b/extensions/browser/api/document_scan/document_scan_interface.cc index c42cf39..976e1a9 100644 --- a/extensions/browser/api/document_scan/document_scan_interface.cc +++ b/extensions/browser/api/document_scan/document_scan_interface.cc @@ -17,6 +17,9 @@ DocumentScanInterface::~DocumentScanInterface() { DocumentScanInterface::ScannerDescription::ScannerDescription() { } +DocumentScanInterface::ScannerDescription::ScannerDescription( + const ScannerDescription& other) = default; + DocumentScanInterface::ScannerDescription::~ScannerDescription() { } diff --git a/extensions/browser/api/document_scan/document_scan_interface.h b/extensions/browser/api/document_scan/document_scan_interface.h index 3339a16..dbcee19 100644 --- a/extensions/browser/api/document_scan/document_scan_interface.h +++ b/extensions/browser/api/document_scan/document_scan_interface.h @@ -19,6 +19,7 @@ class DocumentScanInterface { public: struct ScannerDescription { ScannerDescription(); + ScannerDescription(const ScannerDescription& other); ~ScannerDescription(); std::string name; std::string manufacturer; diff --git a/extensions/browser/api/printer_provider/printer_provider_print_job.cc b/extensions/browser/api/printer_provider/printer_provider_print_job.cc index 3339daf..a2838be 100644 --- a/extensions/browser/api/printer_provider/printer_provider_print_job.cc +++ b/extensions/browser/api/printer_provider/printer_provider_print_job.cc @@ -9,6 +9,9 @@ namespace extensions { PrinterProviderPrintJob::PrinterProviderPrintJob() { } +PrinterProviderPrintJob::PrinterProviderPrintJob( + const PrinterProviderPrintJob& other) = default; + PrinterProviderPrintJob::~PrinterProviderPrintJob() { } diff --git a/extensions/browser/api/printer_provider/printer_provider_print_job.h b/extensions/browser/api/printer_provider/printer_provider_print_job.h index 4148d0d..a9f4b4b 100644 --- a/extensions/browser/api/printer_provider/printer_provider_print_job.h +++ b/extensions/browser/api/printer_provider/printer_provider_print_job.h @@ -22,6 +22,7 @@ namespace extensions { // or bytes. struct PrinterProviderPrintJob { PrinterProviderPrintJob(); + PrinterProviderPrintJob(const PrinterProviderPrintJob& other); ~PrinterProviderPrintJob(); // The id of the printer that should handle the print job. The id is diff --git a/extensions/browser/api/serial/serial_event_dispatcher.cc b/extensions/browser/api/serial/serial_event_dispatcher.cc index 81f9457..31e44b0 100644 --- a/extensions/browser/api/serial/serial_event_dispatcher.cc +++ b/extensions/browser/api/serial/serial_event_dispatcher.cc @@ -59,6 +59,9 @@ SerialEventDispatcher::~SerialEventDispatcher() { SerialEventDispatcher::ReceiveParams::ReceiveParams() { } +SerialEventDispatcher::ReceiveParams::ReceiveParams( + const ReceiveParams& other) = default; + SerialEventDispatcher::ReceiveParams::~ReceiveParams() { } diff --git a/extensions/browser/api/serial/serial_event_dispatcher.h b/extensions/browser/api/serial/serial_event_dispatcher.h index 502f57a..10188af 100644 --- a/extensions/browser/api/serial/serial_event_dispatcher.h +++ b/extensions/browser/api/serial/serial_event_dispatcher.h @@ -48,6 +48,7 @@ class SerialEventDispatcher : public BrowserContextKeyedAPI { struct ReceiveParams { ReceiveParams(); + ReceiveParams(const ReceiveParams& other); ~ReceiveParams(); content::BrowserThread::ID thread_id; diff --git a/extensions/browser/api/socket/socket.cc b/extensions/browser/api/socket/socket.cc index 52ba321..a47f255 100644 --- a/extensions/browser/api/socket/socket.cc +++ b/extensions/browser/api/socket/socket.cc @@ -135,6 +135,8 @@ Socket::WriteRequest::WriteRequest(scoped_refptr<net::IOBuffer> io_buffer, callback(callback), bytes_written(0) {} +Socket::WriteRequest::WriteRequest(const WriteRequest& other) = default; + Socket::WriteRequest::~WriteRequest() {} } // namespace extensions diff --git a/extensions/browser/api/socket/socket.h b/extensions/browser/api/socket/socket.h index 49a4dc3..fefe6bc 100644 --- a/extensions/browser/api/socket/socket.h +++ b/extensions/browser/api/socket/socket.h @@ -137,6 +137,7 @@ class Socket : public ApiResource { WriteRequest(scoped_refptr<net::IOBuffer> io_buffer, int byte_count, const CompletionCallback& callback); + WriteRequest(const WriteRequest& other); ~WriteRequest(); scoped_refptr<net::IOBuffer> io_buffer; int byte_count; diff --git a/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc b/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc index bdc2fbd..7d2f2ca 100644 --- a/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc +++ b/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc @@ -57,6 +57,9 @@ TCPSocketEventDispatcher::~TCPSocketEventDispatcher() {} TCPSocketEventDispatcher::ReadParams::ReadParams() {} +TCPSocketEventDispatcher::ReadParams::ReadParams(const ReadParams& other) = + default; + TCPSocketEventDispatcher::ReadParams::~ReadParams() {} void TCPSocketEventDispatcher::OnSocketConnect(const std::string& extension_id, diff --git a/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h b/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h index 886cb28..0c90980 100644 --- a/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h +++ b/extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.h @@ -56,6 +56,7 @@ class TCPSocketEventDispatcher // as a workaround that limitation for invoking StartReceive. struct ReadParams { ReadParams(); + ReadParams(const ReadParams& other); ~ReadParams(); content::BrowserThread::ID thread_id; diff --git a/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc b/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc index 468237ef..a43d6be 100644 --- a/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc +++ b/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc @@ -62,6 +62,9 @@ TCPServerSocketEventDispatcher::~TCPServerSocketEventDispatcher() {} TCPServerSocketEventDispatcher::AcceptParams::AcceptParams() {} +TCPServerSocketEventDispatcher::AcceptParams::AcceptParams( + const AcceptParams& other) = default; + TCPServerSocketEventDispatcher::AcceptParams::~AcceptParams() {} void TCPServerSocketEventDispatcher::OnServerSocketListen( diff --git a/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h b/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h index ca5f6bc..e792b82 100644 --- a/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h +++ b/extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h @@ -58,6 +58,7 @@ class TCPServerSocketEventDispatcher // as a workaround that limitation for invoking StartAccept. struct AcceptParams { AcceptParams(); + AcceptParams(const AcceptParams& other); ~AcceptParams(); content::BrowserThread::ID thread_id; diff --git a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc index 7b8f9a1..07e2a22 100644 --- a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc +++ b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc @@ -52,6 +52,9 @@ UDPSocketEventDispatcher::~UDPSocketEventDispatcher() {} UDPSocketEventDispatcher::ReceiveParams::ReceiveParams() {} +UDPSocketEventDispatcher::ReceiveParams::ReceiveParams( + const ReceiveParams& other) = default; + UDPSocketEventDispatcher::ReceiveParams::~ReceiveParams() {} void UDPSocketEventDispatcher::OnSocketBind(const std::string& extension_id, diff --git a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h index b4c4624..ff8f111 100644 --- a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h +++ b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h @@ -58,6 +58,7 @@ class UDPSocketEventDispatcher // as a workaround that limitation for invoking StartReceive. struct ReceiveParams { ReceiveParams(); + ReceiveParams(const ReceiveParams& other); ~ReceiveParams(); content::BrowserThread::ID thread_id; diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc index a43d14a..aa799bb 100644 --- a/extensions/browser/api/web_request/web_request_api.cc +++ b/extensions/browser/api/web_request/web_request_api.cc @@ -561,6 +561,9 @@ ExtensionWebRequestEventRouter::RequestFilter::RequestFilter() : tab_id(-1), window_id(-1) { } +ExtensionWebRequestEventRouter::RequestFilter::RequestFilter( + const RequestFilter& other) = default; + ExtensionWebRequestEventRouter::RequestFilter::~RequestFilter() { } diff --git a/extensions/browser/api/web_request/web_request_api.h b/extensions/browser/api/web_request/web_request_api.h index 805d11b..382860d 100644 --- a/extensions/browser/api/web_request/web_request_api.h +++ b/extensions/browser/api/web_request/web_request_api.h @@ -115,6 +115,7 @@ class ExtensionWebRequestEventRouter // filter what network events an extension cares about. struct RequestFilter { RequestFilter(); + RequestFilter(const RequestFilter& other); ~RequestFilter(); // Returns false if there was an error initializing. If it is a user error, diff --git a/extensions/browser/api/web_request/web_request_time_tracker.cc b/extensions/browser/api/web_request/web_request_time_tracker.cc index 806f18d..58bfbad 100644 --- a/extensions/browser/api/web_request/web_request_time_tracker.cc +++ b/extensions/browser/api/web_request/web_request_time_tracker.cc @@ -89,6 +89,9 @@ ExtensionWebRequestTimeTracker::RequestTimeLog::RequestTimeLog() : profile(NULL), completed(false) { } +ExtensionWebRequestTimeTracker::RequestTimeLog::RequestTimeLog( + const RequestTimeLog& other) = default; + ExtensionWebRequestTimeTracker::RequestTimeLog::~RequestTimeLog() { } diff --git a/extensions/browser/api/web_request/web_request_time_tracker.h b/extensions/browser/api/web_request/web_request_time_tracker.h index b65e537..af30731 100644 --- a/extensions/browser/api/web_request/web_request_time_tracker.h +++ b/extensions/browser/api/web_request/web_request_time_tracker.h @@ -91,6 +91,7 @@ class ExtensionWebRequestTimeTracker { base::TimeDelta block_duration; std::map<std::string, base::TimeDelta> extension_block_durations; RequestTimeLog(); + RequestTimeLog(const RequestTimeLog& other); ~RequestTimeLog(); }; |