summaryrefslogtreecommitdiffstats
path: root/sync/internal_api
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2016-02-25 16:47:18 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-26 00:48:41 +0000
commit718d68bed07d2fcf9b6c7ab7e051860bdbf1547f (patch)
treee0edbaf225dacf5aec4875cb4d72b92411c6bab8 /sync/internal_api
parentbbc6b8838d109d972314f404953ebd1e862169de (diff)
downloadchromium_src-718d68bed07d2fcf9b6c7ab7e051860bdbf1547f.zip
chromium_src-718d68bed07d2fcf9b6c7ab7e051860bdbf1547f.tar.gz
chromium_src-718d68bed07d2fcf9b6c7ab7e051860bdbf1547f.tar.bz2
sync: 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=pavely@chromium.org, dcheng@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/1727833003 Cr-Commit-Position: refs/heads/master@{#377734}
Diffstat (limited to 'sync/internal_api')
-rw-r--r--sync/internal_api/attachments/attachment_service_proxy.cc3
-rw-r--r--sync/internal_api/attachments/in_memory_attachment_store.cc3
-rw-r--r--sync/internal_api/change_record.cc2
-rw-r--r--sync/internal_api/public/attachments/attachment_service_proxy.h2
-rw-r--r--sync/internal_api/public/attachments/in_memory_attachment_store.h1
-rw-r--r--sync/internal_api/public/change_record.h1
-rw-r--r--sync/internal_api/public/data_type_association_stats.cc3
-rw-r--r--sync/internal_api/public/data_type_association_stats.h1
-rw-r--r--sync/internal_api/public/data_type_debug_info_listener.cc3
-rw-r--r--sync/internal_api/public/data_type_debug_info_listener.h1
-rw-r--r--sync/internal_api/public/engine/sync_status.cc2
-rw-r--r--sync/internal_api/public/engine/sync_status.h1
-rw-r--r--sync/internal_api/public/non_blocking_sync_common.cc5
-rw-r--r--sync/internal_api/public/non_blocking_sync_common.h2
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.cc2
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.h1
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc3
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h1
-rw-r--r--sync/internal_api/public/sync_manager.cc2
-rw-r--r--sync/internal_api/public/sync_manager.h1
20 files changed, 40 insertions, 0 deletions
diff --git a/sync/internal_api/attachments/attachment_service_proxy.cc b/sync/internal_api/attachments/attachment_service_proxy.cc
index 91a627d..a50f250 100644
--- a/sync/internal_api/attachments/attachment_service_proxy.cc
+++ b/sync/internal_api/attachments/attachment_service_proxy.cc
@@ -46,6 +46,9 @@ AttachmentServiceProxy::AttachmentServiceProxy(
DCHECK(core_.get());
}
+AttachmentServiceProxy::AttachmentServiceProxy(
+ const AttachmentServiceProxy& other) = default;
+
AttachmentServiceProxy::~AttachmentServiceProxy() {
}
diff --git a/sync/internal_api/attachments/in_memory_attachment_store.cc b/sync/internal_api/attachments/in_memory_attachment_store.cc
index 99f6030..b4f834c 100644
--- a/sync/internal_api/attachments/in_memory_attachment_store.cc
+++ b/sync/internal_api/attachments/in_memory_attachment_store.cc
@@ -156,6 +156,9 @@ InMemoryAttachmentStore::AttachmentEntry::AttachmentEntry(
components.insert(initial_reference_component);
}
+InMemoryAttachmentStore::AttachmentEntry::AttachmentEntry(
+ const AttachmentEntry& other) = default;
+
InMemoryAttachmentStore::AttachmentEntry::~AttachmentEntry() {
}
diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc
index 18fb825..a9a17eb 100644
--- a/sync/internal_api/change_record.cc
+++ b/sync/internal_api/change_record.cc
@@ -17,6 +17,8 @@ namespace syncer {
ChangeRecord::ChangeRecord()
: id(kInvalidId), action(ACTION_ADD) {}
+ChangeRecord::ChangeRecord(const ChangeRecord& other) = default;
+
ChangeRecord::~ChangeRecord() {}
scoped_ptr<base::DictionaryValue> ChangeRecord::ToValue() const {
diff --git a/sync/internal_api/public/attachments/attachment_service_proxy.h b/sync/internal_api/public/attachments/attachment_service_proxy.h
index 107576b..7c3897a 100644
--- a/sync/internal_api/public/attachments/attachment_service_proxy.h
+++ b/sync/internal_api/public/attachments/attachment_service_proxy.h
@@ -48,6 +48,8 @@ class SYNC_EXPORT AttachmentServiceProxy : public AttachmentService {
const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
const base::WeakPtr<syncer::AttachmentService>& wrapped);
+ AttachmentServiceProxy(const AttachmentServiceProxy& other);
+
~AttachmentServiceProxy() override;
void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids,
diff --git a/sync/internal_api/public/attachments/in_memory_attachment_store.h b/sync/internal_api/public/attachments/in_memory_attachment_store.h
index 7ae1f5d..04c5fa0 100644
--- a/sync/internal_api/public/attachments/in_memory_attachment_store.h
+++ b/sync/internal_api/public/attachments/in_memory_attachment_store.h
@@ -58,6 +58,7 @@ class SYNC_EXPORT InMemoryAttachmentStore : public AttachmentStoreBackend,
struct AttachmentEntry {
AttachmentEntry(const Attachment& attachment,
AttachmentStore::Component initial_reference_component);
+ AttachmentEntry(const AttachmentEntry& other);
~AttachmentEntry();
Attachment attachment;
diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h
index 0eb887b..43d518a 100644
--- a/sync/internal_api/public/change_record.h
+++ b/sync/internal_api/public/change_record.h
@@ -49,6 +49,7 @@ struct SYNC_EXPORT ChangeRecord {
ACTION_UPDATE,
};
ChangeRecord();
+ ChangeRecord(const ChangeRecord& other);
~ChangeRecord();
scoped_ptr<base::DictionaryValue> ToValue() const;
diff --git a/sync/internal_api/public/data_type_association_stats.cc b/sync/internal_api/public/data_type_association_stats.cc
index 4988de1..a56295a 100644
--- a/sync/internal_api/public/data_type_association_stats.cc
+++ b/sync/internal_api/public/data_type_association_stats.cc
@@ -22,6 +22,9 @@ DataTypeAssociationStats::DataTypeAssociationStats()
had_error(false) {
}
+DataTypeAssociationStats::DataTypeAssociationStats(
+ const DataTypeAssociationStats& other) = default;
+
DataTypeAssociationStats::~DataTypeAssociationStats() {
}
diff --git a/sync/internal_api/public/data_type_association_stats.h b/sync/internal_api/public/data_type_association_stats.h
index cd5b226..f65053b 100644
--- a/sync/internal_api/public/data_type_association_stats.h
+++ b/sync/internal_api/public/data_type_association_stats.h
@@ -15,6 +15,7 @@ namespace syncer {
// Container for datatype association results.
struct SYNC_EXPORT DataTypeAssociationStats {
DataTypeAssociationStats();
+ DataTypeAssociationStats(const DataTypeAssociationStats& other);
~DataTypeAssociationStats();
// The state of the world before association.
diff --git a/sync/internal_api/public/data_type_debug_info_listener.cc b/sync/internal_api/public/data_type_debug_info_listener.cc
index 08355dd..31226e9 100644
--- a/sync/internal_api/public/data_type_debug_info_listener.cc
+++ b/sync/internal_api/public/data_type_debug_info_listener.cc
@@ -9,6 +9,9 @@ namespace syncer {
DataTypeConfigurationStats::DataTypeConfigurationStats()
: model_type(UNSPECIFIED) {}
+DataTypeConfigurationStats::DataTypeConfigurationStats(
+ const DataTypeConfigurationStats& other) = default;
+
DataTypeConfigurationStats::~DataTypeConfigurationStats() {}
} // namespace syncer
diff --git a/sync/internal_api/public/data_type_debug_info_listener.h b/sync/internal_api/public/data_type_debug_info_listener.h
index 6395a04..9101bdd 100644
--- a/sync/internal_api/public/data_type_debug_info_listener.h
+++ b/sync/internal_api/public/data_type_debug_info_listener.h
@@ -14,6 +14,7 @@ namespace syncer {
struct SYNC_EXPORT DataTypeConfigurationStats {
DataTypeConfigurationStats();
+ DataTypeConfigurationStats(const DataTypeConfigurationStats& other);
~DataTypeConfigurationStats();
// The datatype that was configured.
diff --git a/sync/internal_api/public/engine/sync_status.cc b/sync/internal_api/public/engine/sync_status.cc
index bd01406..45c3d7e 100644
--- a/sync/internal_api/public/engine/sync_status.cc
+++ b/sync/internal_api/public/engine/sync_status.cc
@@ -30,6 +30,8 @@ SyncStatus::SyncStatus()
num_entries_by_type(MODEL_TYPE_COUNT, 0),
num_to_delete_entries_by_type(MODEL_TYPE_COUNT, 0) {}
+SyncStatus::SyncStatus(const SyncStatus& other) = default;
+
SyncStatus::~SyncStatus() {
}
diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h
index 60bb961..1587dd1 100644
--- a/sync/internal_api/public/engine/sync_status.h
+++ b/sync/internal_api/public/engine/sync_status.h
@@ -24,6 +24,7 @@ namespace syncer {
// DictionaryValue used to populate the about:sync summary tab.
struct SYNC_EXPORT SyncStatus {
SyncStatus();
+ SyncStatus(const SyncStatus& other);
~SyncStatus();
// TODO(akalin): Replace this with a NotificationsDisabledReason
diff --git a/sync/internal_api/public/non_blocking_sync_common.cc b/sync/internal_api/public/non_blocking_sync_common.cc
index a8ad64f..7f7c8f9 100644
--- a/sync/internal_api/public/non_blocking_sync_common.cc
+++ b/sync/internal_api/public/non_blocking_sync_common.cc
@@ -8,6 +8,8 @@ namespace syncer_v2 {
CommitRequestData::CommitRequestData() {}
+CommitRequestData::CommitRequestData(const CommitRequestData& other) = default;
+
CommitRequestData::~CommitRequestData() {}
CommitResponseData::CommitResponseData() {}
@@ -16,6 +18,9 @@ CommitResponseData::~CommitResponseData() {}
UpdateResponseData::UpdateResponseData() {}
+UpdateResponseData::UpdateResponseData(const UpdateResponseData& other) =
+ default;
+
UpdateResponseData::~UpdateResponseData() {}
} // namespace syncer_v2
diff --git a/sync/internal_api/public/non_blocking_sync_common.h b/sync/internal_api/public/non_blocking_sync_common.h
index b12ff01..45ea7dc 100644
--- a/sync/internal_api/public/non_blocking_sync_common.h
+++ b/sync/internal_api/public/non_blocking_sync_common.h
@@ -21,6 +21,7 @@ static const int64_t kUncommittedVersion = -1;
struct SYNC_EXPORT CommitRequestData {
CommitRequestData();
+ CommitRequestData(const CommitRequestData& other);
~CommitRequestData();
EntityDataPtr entity;
@@ -44,6 +45,7 @@ struct SYNC_EXPORT CommitResponseData {
struct SYNC_EXPORT UpdateResponseData {
UpdateResponseData();
+ UpdateResponseData(const UpdateResponseData& other);
~UpdateResponseData();
EntityDataPtr entity;
diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc
index 37d0174..71b1591 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.cc
+++ b/sync/internal_api/public/sessions/model_neutral_state.cc
@@ -25,6 +25,8 @@ ModelNeutralState::ModelNeutralState()
items_committed(false) {
}
+ModelNeutralState::ModelNeutralState(const ModelNeutralState& other) = default;
+
ModelNeutralState::~ModelNeutralState() {}
bool HasSyncerError(const ModelNeutralState& state) {
diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h
index 91bce88..6a785a5 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.h
+++ b/sync/internal_api/public/sessions/model_neutral_state.h
@@ -19,6 +19,7 @@ namespace sessions {
// model types.
struct SYNC_EXPORT ModelNeutralState {
ModelNeutralState();
+ ModelNeutralState(const ModelNeutralState& other);
~ModelNeutralState();
// The set of types for which updates were requested from the server.
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index e595934..624d517 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -57,6 +57,9 @@ SyncSessionSnapshot::SyncSessionSnapshot(
is_initialized_(true) {
}
+SyncSessionSnapshot::SyncSessionSnapshot(const SyncSessionSnapshot& other) =
+ default;
+
SyncSessionSnapshot::~SyncSessionSnapshot() {}
scoped_ptr<base::DictionaryValue> SyncSessionSnapshot::ToValue() const {
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index fbe54eb..76ada7c 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -45,6 +45,7 @@ class SYNC_EXPORT SyncSessionSnapshot {
const std::vector<int>& num_entries_by_type,
const std::vector<int>& num_to_delete_entries_by_type,
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource legacy_updates_source);
+ SyncSessionSnapshot(const SyncSessionSnapshot& other);
~SyncSessionSnapshot();
scoped_ptr<base::DictionaryValue> ToValue() const;
diff --git a/sync/internal_api/public/sync_manager.cc b/sync/internal_api/public/sync_manager.cc
index 8f8fd79..e82613e 100644
--- a/sync/internal_api/public/sync_manager.cc
+++ b/sync/internal_api/public/sync_manager.cc
@@ -8,6 +8,8 @@ namespace syncer {
SyncCredentials::SyncCredentials() {}
+SyncCredentials::SyncCredentials(const SyncCredentials& other) = default;
+
SyncCredentials::~SyncCredentials() {}
SyncManager::ChangeDelegate::~ChangeDelegate() {}
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index e1cfc29..1f834f3 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -66,6 +66,7 @@ class SyncSessionSnapshot;
// Contains everything needed to talk to and identify a user account.
struct SYNC_EXPORT SyncCredentials {
SyncCredentials();
+ SyncCredentials(const SyncCredentials& other);
~SyncCredentials();
// Account_id of signed in account.