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

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

Issue 247983002: Keep track of which attachments are referenced by which sync entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rework tests and move AttachmentIdProto creation to avoid violating DEPS. 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 6f3e0a24abf2b99dcf634775286ea81168b94a2c..e61705e63ab7daecd4456249790e5bd17b159045 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 "base/rand_util.h"
+#include "sync/internal_api/public/base/attachment_id_proto.h"
#include "sync/protocol/sync.pb.h"
namespace syncer {
@@ -53,10 +53,7 @@ bool AttachmentId::operator<(const AttachmentId& other) const {
// Static.
AttachmentId AttachmentId::Create() {
- // 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));
+ sync_pb::AttachmentIdProto proto = CreateAttachmentIdProto();
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