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

Unified Diff: sync/internal_api/public/base/attachment_id_proto.cc

Issue 982883002: [Sync] Add size and crc32c to AttachmentId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master. Created 5 years, 9 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/internal_api/public/base/attachment_id_proto.cc
diff --git a/sync/internal_api/public/base/attachment_id_proto.cc b/sync/internal_api/public/base/attachment_id_proto.cc
index 52728cdf9f5b75dd974a485f22b4f0de99b0e56f..6692ab70dc77d5bc0411a2222028b85e215ebcf2 100644
--- a/sync/internal_api/public/base/attachment_id_proto.cc
+++ b/sync/internal_api/public/base/attachment_id_proto.cc
@@ -10,13 +10,16 @@
namespace syncer {
-sync_pb::AttachmentIdProto CreateAttachmentIdProto() {
+sync_pb::AttachmentIdProto CreateAttachmentIdProto(size_t size,
+ uint32_t crc32c) {
sync_pb::AttachmentIdProto proto;
std::string guid = base::StringToLowerASCII(base::GenerateGUID());
DCHECK(!guid.empty());
// Requirements are that this id must be a unique RFC4122 UUID, formatted in
// lower case.
proto.set_unique_id(guid);
+ proto.set_size_bytes(size);
+ proto.set_crc32c(crc32c);
return proto;
}
« no previous file with comments | « sync/internal_api/public/base/attachment_id_proto.h ('k') | sync/internal_api/public/base/attachment_id_proto_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698