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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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
deleted file mode 100644
index 3166b100d7a69bfc9c64ae4c1fbfadbd14472921..0000000000000000000000000000000000000000
--- a/sync/internal_api/public/base/attachment_id_proto.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// 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.
-
-#include "sync/internal_api/public/base/attachment_id_proto.h"
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <string>
-
-#include "base/guid.h"
-#include "base/logging.h"
-#include "base/strings/string_util.h"
-
-namespace syncer {
-
-sync_pb::AttachmentIdProto CreateAttachmentIdProto(size_t size,
- uint32_t crc32c) {
- sync_pb::AttachmentIdProto proto;
- std::string guid = base::ToLowerASCII(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;
-}
-
-sync_pb::AttachmentMetadata CreateAttachmentMetadata(
- const google::protobuf::RepeatedPtrField<sync_pb::AttachmentIdProto>& ids) {
- sync_pb::AttachmentMetadata result;
- for (int i = 0; i < ids.size(); ++i) {
- sync_pb::AttachmentMetadataRecord* record = result.add_record();
- *record->mutable_id() = ids.Get(i);
- record->set_is_on_server(true);
- }
- return result;
-}
-
-} // namespace syncer
« 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