From bf0d713a72db33bdf6c51d65f009f73e822db3e0 Mon Sep 17 00:00:00 2001 From: vmpstr Date: Thu, 24 Mar 2016 13:22:54 -0700 Subject: Add more out of line copy ctors for complex classes. This patch adds the remaining copy constructors for complex classes. After this patch, it should be possible to enable the heavy class copy constructor checks by default. R=thakis@chromium.org, dcheng@chromium.org TBR=jam@chromium.org BUG=436357 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1825273002 Cr-Commit-Position: refs/heads/master@{#383131} --- components/autofill/core/browser/field_candidates.cc | 2 ++ components/autofill/core/browser/field_candidates.h | 1 + components/mus/ws/platform_display_init_params.cc | 2 ++ components/mus/ws/platform_display_init_params.h | 1 + components/mus/ws/test_change_tracker.cc | 4 ++++ components/mus/ws/test_change_tracker.h | 2 ++ components/page_load_metrics/common/page_load_timing.cc | 2 ++ components/page_load_metrics/common/page_load_timing.h | 1 + components/safe_browsing_db/util.cc | 2 ++ components/safe_browsing_db/util.h | 1 + 10 files changed, 18 insertions(+) (limited to 'components') diff --git a/components/autofill/core/browser/field_candidates.cc b/components/autofill/core/browser/field_candidates.cc index d133b08..142e435 100644 --- a/components/autofill/core/browser/field_candidates.cc +++ b/components/autofill/core/browser/field_candidates.cc @@ -16,6 +16,8 @@ FieldCandidate::FieldCandidate(ServerFieldType field_type, float field_score) FieldCandidates::FieldCandidates() {} +FieldCandidates::FieldCandidates(const FieldCandidates& other) = default; + FieldCandidates::~FieldCandidates() {} void FieldCandidates::AddFieldCandidate(ServerFieldType type, float score) { diff --git a/components/autofill/core/browser/field_candidates.h b/components/autofill/core/browser/field_candidates.h index 16a6a24..e1d7ef6 100644 --- a/components/autofill/core/browser/field_candidates.h +++ b/components/autofill/core/browser/field_candidates.h @@ -29,6 +29,7 @@ struct FieldCandidate { class FieldCandidates { public: FieldCandidates(); + FieldCandidates(const FieldCandidates& other); ~FieldCandidates(); // Includes a possible |type| for a given field. diff --git a/components/mus/ws/platform_display_init_params.cc b/components/mus/ws/platform_display_init_params.cc index 398a6ba..94ad22d 100644 --- a/components/mus/ws/platform_display_init_params.cc +++ b/components/mus/ws/platform_display_init_params.cc @@ -11,6 +11,8 @@ namespace mus { namespace ws { PlatformDisplayInitParams::PlatformDisplayInitParams() {} +PlatformDisplayInitParams::PlatformDisplayInitParams( + const PlatformDisplayInitParams& other) = default; PlatformDisplayInitParams::~PlatformDisplayInitParams() {} } // namespace ws diff --git a/components/mus/ws/platform_display_init_params.h b/components/mus/ws/platform_display_init_params.h index 81cc1b0..f097a0f 100644 --- a/components/mus/ws/platform_display_init_params.h +++ b/components/mus/ws/platform_display_init_params.h @@ -20,6 +20,7 @@ namespace ws { struct PlatformDisplayInitParams { PlatformDisplayInitParams(); + PlatformDisplayInitParams(const PlatformDisplayInitParams& other); ~PlatformDisplayInitParams(); mojo::Connector* connector = nullptr; diff --git a/components/mus/ws/test_change_tracker.cc b/components/mus/ws/test_change_tracker.cc index 8416f95..aefa54e 100644 --- a/components/mus/ws/test_change_tracker.cc +++ b/components/mus/ws/test_change_tracker.cc @@ -198,6 +198,8 @@ Change::Change() bool_value(false), change_id(0u) {} +Change::Change(const Change& other) = default; + Change::~Change() {} TestChangeTracker::TestChangeTracker() : delegate_(NULL) {} @@ -391,6 +393,8 @@ void TestChangeTracker::AddChange(const Change& change) { TestWindow::TestWindow() {} +TestWindow::TestWindow(const TestWindow& other) = default; + TestWindow::~TestWindow() {} std::string TestWindow::ToString() const { diff --git a/components/mus/ws/test_change_tracker.h b/components/mus/ws/test_change_tracker.h index 7f64d84..46103bc 100644 --- a/components/mus/ws/test_change_tracker.h +++ b/components/mus/ws/test_change_tracker.h @@ -46,6 +46,7 @@ enum ChangeType { // TODO(sky): consider nuking and converting directly to WindowData. struct TestWindow { TestWindow(); + TestWindow(const TestWindow& other); ~TestWindow(); // Returns a string description of this. @@ -65,6 +66,7 @@ struct TestWindow { // fields that are used. struct Change { Change(); + Change(const Change& other); ~Change(); ChangeType type; diff --git a/components/page_load_metrics/common/page_load_timing.cc b/components/page_load_metrics/common/page_load_timing.cc index 17f3f04..a479f70 100644 --- a/components/page_load_metrics/common/page_load_timing.cc +++ b/components/page_load_metrics/common/page_load_timing.cc @@ -8,6 +8,8 @@ namespace page_load_metrics { PageLoadTiming::PageLoadTiming() {} +PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default; + PageLoadTiming::~PageLoadTiming() {} bool PageLoadTiming::operator==(const PageLoadTiming& other) const { diff --git a/components/page_load_metrics/common/page_load_timing.h b/components/page_load_metrics/common/page_load_timing.h index 285cf65..4336a28 100644 --- a/components/page_load_metrics/common/page_load_timing.h +++ b/components/page_load_metrics/common/page_load_timing.h @@ -15,6 +15,7 @@ namespace page_load_metrics { struct PageLoadTiming { public: PageLoadTiming(); + PageLoadTiming(const PageLoadTiming& other); ~PageLoadTiming(); bool operator==(const PageLoadTiming& other) const; diff --git a/components/safe_browsing_db/util.cc b/components/safe_browsing_db/util.cc index da26b2a..0b77f7f6 100644 --- a/components/safe_browsing_db/util.cc +++ b/components/safe_browsing_db/util.cc @@ -33,6 +33,8 @@ bool IsKnownList(const std::string& name) { ThreatMetadata::ThreatMetadata() : threat_pattern_type(ThreatPatternType::NONE) {} +ThreatMetadata::ThreatMetadata(const ThreatMetadata& other) = default; + ThreatMetadata::~ThreatMetadata() {} // SBCachedFullHashResult ------------------------------------------------------ diff --git a/components/safe_browsing_db/util.h b/components/safe_browsing_db/util.h index 932d5bd..e36ce1d 100644 --- a/components/safe_browsing_db/util.h +++ b/components/safe_browsing_db/util.h @@ -65,6 +65,7 @@ enum class ThreatPatternType { // Some fields are only applicable to certain lists. struct ThreatMetadata { ThreatMetadata(); + ThreatMetadata(const ThreatMetadata& other); ~ThreatMetadata(); // Type of blacklisted page. Used on malware and UwS lists. -- cgit v1.1