Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / sync / internal_api / public / base / attachment_id_proto.cc
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "sync/internal_api/public/base/attachment_id_proto.h"
6
7 #include "base/guid.h"
8 #include "base/logging.h"
9
10 namespace syncer {
11
12 sync_pb::AttachmentIdProto CreateAttachmentIdProto() {
13   // Only requirement here is that this id must be globally unique.
14   sync_pb::AttachmentIdProto proto;
15   std::string guid = base::GenerateGUID();
16   DCHECK(!guid.empty());
17   proto.set_unique_id(guid);
18   return proto;
19 }
20
21 }  // namespace syncer