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

Unified Diff: sync/api/attachments/attachment_id.cc

Issue 265853004: Revert of Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: sync/api/attachments/attachment_id.cc
diff --git a/sync/api/attachments/attachment_id.cc b/sync/api/attachments/attachment_id.cc
index e61705e63ab7daecd4456249790e5bd17b159045..6f3e0a24abf2b99dcf634775286ea81168b94a2c 100644
--- a/sync/api/attachments/attachment_id.cc
+++ b/sync/api/attachments/attachment_id.cc
@@ -5,7 +5,7 @@
#include "sync/api/attachments/attachment_id.h"
#include "base/logging.h"
-#include "sync/internal_api/public/base/attachment_id_proto.h"
+#include "base/rand_util.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
@@ -53,7 +53,10 @@
// Static.
AttachmentId AttachmentId::Create() {
- sync_pb::AttachmentIdProto proto = CreateAttachmentIdProto();
+ // Only requirement here is that this id must be globally unique.
+ // TODO(maniscalco): Consider making this base64 encoded.
+ sync_pb::AttachmentIdProto proto;
+ proto.set_unique_id(base::RandBytesAsString(16));
return AttachmentId(&proto);
}
« no previous file with comments | « components/sync_driver/generic_change_processor_unittest.cc ('k') | sync/api/attachments/attachment_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698