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

Side by Side Diff: components/sync/api/sync_data.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « components/sync/api/sync_change_unittest.cc ('k') | components/sync/api/sync_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_API_SYNC_DATA_H_ 5 #ifndef COMPONENTS_SYNC_API_SYNC_DATA_H_
6 #define COMPONENTS_SYNC_API_SYNC_DATA_H_ 6 #define COMPONENTS_SYNC_API_SYNC_DATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const std::string& non_unique_title, 66 const std::string& non_unique_title,
67 const sync_pb::EntitySpecifics& specifics, 67 const sync_pb::EntitySpecifics& specifics,
68 const AttachmentIdList& attachment_ids); 68 const AttachmentIdList& attachment_ids);
69 69
70 // Helper method for creating SyncData objects originating from the syncer. 70 // Helper method for creating SyncData objects originating from the syncer.
71 static SyncData CreateRemoteData( 71 static SyncData CreateRemoteData(
72 int64_t id, 72 int64_t id,
73 const sync_pb::EntitySpecifics& specifics, 73 const sync_pb::EntitySpecifics& specifics,
74 const base::Time& last_modified_time, 74 const base::Time& last_modified_time,
75 const AttachmentIdList& attachment_ids, 75 const AttachmentIdList& attachment_ids,
76 const AttachmentServiceProxy& attachment_service, 76 const syncer::AttachmentServiceProxy& attachment_service,
77 const std::string& client_tag_hash = std::string()); 77 const std::string& client_tag_hash = std::string());
78 78
79 // Whether this SyncData holds valid data. The only way to have a SyncData 79 // Whether this SyncData holds valid data. The only way to have a SyncData
80 // without valid data is to use the default constructor. 80 // without valid data is to use the default constructor.
81 bool IsValid() const; 81 bool IsValid() const;
82 82
83 // Return the datatype we're holding information about. Derived from the sync 83 // Return the datatype we're holding information about. Derived from the sync
84 // datatype specifics. 84 // datatype specifics.
85 ModelType GetDataType() const; 85 ModelType GetDataType() const;
86 86
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 AttachmentServiceProxy attachment_service_; 138 AttachmentServiceProxy attachment_service_;
139 139
140 private: 140 private:
141 // Whether this SyncData holds valid data. 141 // Whether this SyncData holds valid data.
142 bool is_valid_; 142 bool is_valid_;
143 143
144 // Clears |entity| and |attachments|. 144 // Clears |entity| and |attachments|.
145 SyncData(int64_t id, 145 SyncData(int64_t id,
146 sync_pb::SyncEntity* entity, 146 sync_pb::SyncEntity* entity,
147 const base::Time& remote_modification_time, 147 const base::Time& remote_modification_time,
148 const AttachmentServiceProxy& attachment_service); 148 const syncer::AttachmentServiceProxy& attachment_service);
149 }; 149 };
150 150
151 // A SyncData going to the syncer. 151 // A SyncData going to the syncer.
152 class SyncDataLocal : public SyncData { 152 class SyncDataLocal : public SyncData {
153 public: 153 public:
154 // Construct a SyncDataLocal from a SyncData. 154 // Construct a SyncDataLocal from a SyncData.
155 // 155 //
156 // |sync_data|'s IsLocal() must be true. 156 // |sync_data|'s IsLocal() must be true.
157 explicit SyncDataLocal(const SyncData& sync_data); 157 explicit SyncDataLocal(const SyncData& sync_data);
158 ~SyncDataLocal(); 158 ~SyncDataLocal();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 }; 196 };
197 197
198 // gmock printer helper. 198 // gmock printer helper.
199 void PrintTo(const SyncData& sync_data, std::ostream* os); 199 void PrintTo(const SyncData& sync_data, std::ostream* os);
200 200
201 typedef std::vector<SyncData> SyncDataList; 201 typedef std::vector<SyncData> SyncDataList;
202 202
203 } // namespace syncer 203 } // namespace syncer
204 204
205 #endif // COMPONENTS_SYNC_API_SYNC_DATA_H_ 205 #endif // COMPONENTS_SYNC_API_SYNC_DATA_H_
OLDNEW
« no previous file with comments | « components/sync/api/sync_change_unittest.cc ('k') | components/sync/api/sync_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698