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

Unified Diff: sync/api/sync_data.h

Issue 11533008: Use delete journal to remove bookmarks that are already deleted in sync model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: sync/api/sync_data.h
diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h
index b88e0e7340a463ffb79bde13eba73c60d4d4cd62..6a058629a84e28edf9f284f7794c7ba37913a760 100644
--- a/sync/api/sync_data.h
+++ b/sync/api/sync_data.h
@@ -41,15 +41,17 @@ class SyncData {
// overwritten if the datatype is encrypted.
static SyncData CreateLocalDelete(
const std::string& sync_tag,
- ModelType datatype);
+ ModelType datatype,
+ bool is_folder);
static SyncData CreateLocalData(
const std::string& sync_tag,
const std::string& non_unique_title,
- const sync_pb::EntitySpecifics& specifics);
+ const sync_pb::EntitySpecifics& specifics,
+ bool is_folder);
// Helper method for creating SyncData objects originating from the syncer.
static SyncData CreateRemoteData(
- int64 id, const sync_pb::EntitySpecifics& specifics);
+ int64 id, const sync_pb::EntitySpecifics& specifics, bool is_folder);
// Whether this SyncData holds valid data. The only way to have a SyncData
// without valid data is to use the default constructor.
@@ -76,6 +78,8 @@ class SyncData {
// Whether this sync data is for local data or data coming from the syncer.
bool IsLocal() const;
+ bool IsFolder() const;
+
std::string ToString() const;
// TODO(zea): Query methods for other sync properties: parent, successor, etc.
@@ -109,10 +113,14 @@ class SyncData {
// Equal to kInvalidId iff this is local.
int64 id_;
+ bool is_folder_;
+
// The actual shared sync entity being held.
ImmutableSyncEntity immutable_entity_;
};
+typedef std::vector<syncer::SyncData> SyncDataList;
+
// gmock printer helper.
void PrintTo(const SyncData& sync_data, std::ostream* os);

Powered by Google App Engine
This is Rietveld 408576698