Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: sync/api/entity_data.cc

Issue 1477643002: Remove the TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03 macro. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basepass
Patch Set: type-with-move: . Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/api/entity_data.h" 5 #include "sync/api/entity_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace syncer_v2 { 9 namespace syncer_v2 {
10 10
(...skipping 10 matching lines...) Expand all
21 std::swap(creation_time, other->creation_time); 21 std::swap(creation_time, other->creation_time);
22 std::swap(modification_time, other->modification_time); 22 std::swap(modification_time, other->modification_time);
23 23
24 parent_id.swap(other->parent_id); 24 parent_id.swap(other->parent_id);
25 unique_position.Swap(&other->unique_position); 25 unique_position.Swap(&other->unique_position);
26 } 26 }
27 27
28 EntityDataPtr EntityData::Pass() { 28 EntityDataPtr EntityData::Pass() {
29 EntityDataPtr target; 29 EntityDataPtr target;
30 target.swap_value(this); 30 target.swap_value(this);
31 return target.Pass(); 31 return target;
32 } 32 }
33 33
34 void EntityDataTraits::SwapValue(EntityData* dest, EntityData* src) { 34 void EntityDataTraits::SwapValue(EntityData* dest, EntityData* src) {
35 dest->Swap(src); 35 dest->Swap(src);
36 } 36 }
37 37
38 bool EntityDataTraits::HasValue(const EntityData& value) { 38 bool EntityDataTraits::HasValue(const EntityData& value) {
39 return !value.client_tag_hash.empty(); 39 return !value.client_tag_hash.empty();
40 } 40 }
41 41
42 const EntityData& EntityDataTraits::DefaultValue() { 42 const EntityData& EntityDataTraits::DefaultValue() {
43 CR_DEFINE_STATIC_LOCAL(EntityData, default_instance, ()); 43 CR_DEFINE_STATIC_LOCAL(EntityData, default_instance, ());
44 return default_instance; 44 return default_instance;
45 } 45 }
46 46
47 } // namespace syncer_v2 47 } // namespace syncer_v2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698