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

Unified Diff: sync/engine/non_blocking_sync_common.h

Issue 280983002: Implement sync in the NonBlockingTypeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some comments Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: sync/engine/non_blocking_sync_common.h
diff --git a/sync/engine/non_blocking_sync_common.h b/sync/engine/non_blocking_sync_common.h
new file mode 100644
index 0000000000000000000000000000000000000000..8eac629bf095fa1dbe28b5065ae72cf9dd31384c
--- /dev/null
+++ b/sync/engine/non_blocking_sync_common.h
@@ -0,0 +1,71 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_
+#define SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_
+
+#include <string>
+#include <vector>
+
+#include "base/time/time.h"
+#include "sync/base/sync_export.h"
+#include "sync/protocol/sync.pb.h"
+
+namespace syncer {
+
+struct SYNC_EXPORT_PRIVATE DataTypeState {
+ DataTypeState();
+ ~DataTypeState();
+
+ sync_pb::DataTypeProgressMarker progress_marker;
+ sync_pb::DataTypeContext type_context;
+ std::string parent_id;
Nicolas Zea 2014/05/19 23:54:15 why do we have parent_id and next_id here? Aren't
rlarocque 2014/05/20 01:39:47 parent_id: Other than bookmarks, sync doesn't real
Nicolas Zea 2014/05/20 21:51:08 I think it would be clearer to rename these two fi
rlarocque 2014/05/20 22:29:21 Renamed and added lots of comments for this struct
+ int64 next_id;
+};
+
+struct SYNC_EXPORT_PRIVATE CommitRequestData {
+ CommitRequestData();
+ ~CommitRequestData();
+
+ std::string id;
+ std::string client_tag;
+ int64 sequence_number;
Nicolas Zea 2014/05/19 23:54:15 what is sequence number?
rlarocque 2014/05/20 01:39:47 A new concept for non-blocking sync. Feel free to
Nicolas Zea 2014/05/20 21:51:08 The name is fine, I mainly want comments
rlarocque 2014/05/20 22:29:21 Added a comment. It points readers to look for th
+ int64 base_version;
+ base::Time ctime;
+ base::Time mtime;
+ bool deleted;
+ sync_pb::EntitySpecifics specifics;
Nicolas Zea 2014/05/19 23:54:15 what about non unique name?
rlarocque 2014/05/20 01:39:47 That's a bug. I must have had the ProcessorCore e
+};
+
+struct SYNC_EXPORT_PRIVATE CommitResponseData {
+ CommitResponseData();
+ ~CommitResponseData();
+
+ std::string id;
+ std::string client_tag_hash;
+ int64 sequence_number;
+ int64 response_version;
+};
+
+struct SYNC_EXPORT_PRIVATE UpdateResponseData {
+ UpdateResponseData();
+ ~UpdateResponseData();
+
+ std::string id;
+ std::string client_tag_hash;
+ int64 response_version;
Nicolas Zea 2014/05/19 23:54:15 server_version?
rlarocque 2014/05/20 01:39:47 I'm a bit reluctant to use the term 'server_versio
+ base::Time ctime;
+ base::Time mtime;
+ std::string non_unique_name;
+ bool deleted;
+ sync_pb::EntitySpecifics specifics;
+};
+
+typedef std::vector<CommitRequestData> CommitRequestDataList;
+typedef std::vector<CommitResponseData> CommitResponseDataList;
+typedef std::vector<UpdateResponseData> UpdateResponseDataList;
+
+} // namespace syncer
+
+#endif // SYNC_ENGINE_NON_BLOCKING_SYNC_COMMON_H_

Powered by Google App Engine
This is Rietveld 408576698