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

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

Issue 213003004: Replace calls to 3-arg SyncData::CreateLocalData with 5-arg version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Merge with master. Created 6 years, 8 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
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 SYNC_API_SYNC_DATA_H_ 5 #ifndef SYNC_API_SYNC_DATA_H_
6 #define SYNC_API_SYNC_DATA_H_ 6 #define SYNC_API_SYNC_DATA_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const std::string& sync_tag, 57 const std::string& sync_tag,
58 const std::string& non_unique_title, 58 const std::string& non_unique_title,
59 const sync_pb::EntitySpecifics& specifics); 59 const sync_pb::EntitySpecifics& specifics);
60 static SyncData CreateLocalDataWithAttachments( 60 static SyncData CreateLocalDataWithAttachments(
61 const std::string& sync_tag, 61 const std::string& sync_tag,
62 const std::string& non_unique_title, 62 const std::string& non_unique_title,
63 const sync_pb::EntitySpecifics& specifics, 63 const sync_pb::EntitySpecifics& specifics,
64 const AttachmentList& attachments); 64 const AttachmentList& attachments);
65 65
66 // Helper method for creating SyncData objects originating from the syncer. 66 // Helper method for creating SyncData objects originating from the syncer.
67 //
68 // TODO(maniscalco): Replace all calls to 3-arg CreateRemoteData with calls to
69 // the 5-arg version (bug 353296).
70 static SyncData CreateRemoteData( 67 static SyncData CreateRemoteData(
71 int64 id, 68 int64 id,
72 const sync_pb::EntitySpecifics& specifics, 69 const sync_pb::EntitySpecifics& specifics,
73 const base::Time& last_modified_time, 70 const base::Time& last_modified_time,
74 const AttachmentIdList& attachment_ids, 71 const AttachmentIdList& attachment_ids,
75 const syncer::AttachmentServiceProxy& attachment_service); 72 const syncer::AttachmentServiceProxy& attachment_service);
76 static SyncData CreateRemoteData(int64 id,
77 const sync_pb::EntitySpecifics& specifics,
78 const base::Time& last_modified_time);
79 73
80 // Whether this SyncData holds valid data. The only way to have a SyncData 74 // Whether this SyncData holds valid data. The only way to have a SyncData
81 // without valid data is to use the default constructor. 75 // without valid data is to use the default constructor.
82 bool IsValid() const; 76 bool IsValid() const;
83 77
84 // Return the datatype we're holding information about. Derived from the sync 78 // Return the datatype we're holding information about. Derived from the sync
85 // datatype specifics. 79 // datatype specifics.
86 ModelType GetDataType() const; 80 ModelType GetDataType() const;
87 81
88 // Return the current sync datatype specifics. 82 // Return the current sync datatype specifics.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 }; 202 };
209 203
210 // gmock printer helper. 204 // gmock printer helper.
211 void PrintTo(const SyncData& sync_data, std::ostream* os); 205 void PrintTo(const SyncData& sync_data, std::ostream* os);
212 206
213 typedef std::vector<SyncData> SyncDataList; 207 typedef std::vector<SyncData> SyncDataList;
214 208
215 } // namespace syncer 209 } // namespace syncer
216 210
217 #endif // SYNC_API_SYNC_DATA_H_ 211 #endif // SYNC_API_SYNC_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698