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

Side by Side Diff: components/sync/model/entity_data.h

Issue 2458013002: [Sync] Rename ModelTypeService to ModelTypeSyncBridge. (Closed)
Patch Set: s/SetBridgeError/ErrorOnNextCall Created 4 years, 1 month 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 #ifndef COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_
6 #define COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_ 6 #define COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 13 matching lines...) Expand all
24 static void SwapValue(EntityData* dest, EntityData* src); 24 static void SwapValue(EntityData* dest, EntityData* src);
25 static bool HasValue(const EntityData& value); 25 static bool HasValue(const EntityData& value);
26 static const EntityData& DefaultValue(); 26 static const EntityData& DefaultValue();
27 }; 27 };
28 28
29 typedef ProtoValuePtr<EntityData, EntityDataTraits> EntityDataPtr; 29 typedef ProtoValuePtr<EntityData, EntityDataTraits> EntityDataPtr;
30 typedef std::vector<EntityDataPtr> EntityDataList; 30 typedef std::vector<EntityDataPtr> EntityDataList;
31 typedef std::map<std::string, EntityDataPtr> EntityDataMap; 31 typedef std::map<std::string, EntityDataPtr> EntityDataMap;
32 32
33 // A light-weight container for sync entity data which represents either 33 // A light-weight container for sync entity data which represents either
34 // local data created on the ModelTypeService side or remote data created 34 // local data created on the ModelTypeSyncBridge side or remote data created
35 // on ModelTypeWorker. 35 // on ModelTypeWorker.
36 // EntityData is supposed to be wrapped and passed by reference. 36 // EntityData is supposed to be wrapped and passed by reference.
37 struct EntityData { 37 struct EntityData {
38 public: 38 public:
39 EntityData(); 39 EntityData();
40 ~EntityData(); 40 ~EntityData();
41 41
42 // Typically this is a server assigned sync ID, although for a local change 42 // Typically this is a server assigned sync ID, although for a local change
43 // that represents a new entity this field might be either empty or contain 43 // that represents a new entity this field might be either empty or contain
44 // a temporary client sync ID. 44 // a temporary client sync ID.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 friend struct EntityDataTraits; 83 friend struct EntityDataTraits;
84 // Used to transfer the data without copying. 84 // Used to transfer the data without copying.
85 void Swap(EntityData* other); 85 void Swap(EntityData* other);
86 86
87 DISALLOW_COPY_AND_ASSIGN(EntityData); 87 DISALLOW_COPY_AND_ASSIGN(EntityData);
88 }; 88 };
89 89
90 } // namespace syncer 90 } // namespace syncer
91 91
92 #endif // COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_ 92 #endif // COMPONENTS_SYNC_MODEL_ENTITY_DATA_H_
OLDNEW
« no previous file with comments | « components/sync/driver/sync_driver_switches.cc ('k') | components/sync/model/fake_model_type_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698