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

Side by Side Diff: sync/syncable/syncable_proto_util.h

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, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2012 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 #ifndef SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
6 #define SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
7
8 #include <string>
9
10 #include "sync/base/sync_export.h"
11 #include "sync/syncable/syncable_id.h"
12
13 namespace sync_pb {
14 class SyncEntity;
15 }
16
17 namespace syncer {
18
19 // Converts from a specially formatted string field to a syncable::Id. Used
20 // when interpreting the fields of protocol buffers received from the server.
21 syncable::Id SyncableIdFromProto(const std::string& proto_string);
22
23 // Converts from a syncable::Id to a formatted std::string. This is useful for
24 // populating the fields of a protobuf which will be sent to the server.
25 SYNC_EXPORT std::string SyncableIdToProto(const syncable::Id& syncable_id);
26
27 // Helper function to determine if this SyncEntity's properties indicate that it
28 // is a folder.
29 bool IsFolder(const sync_pb::SyncEntity& entity);
30
31 // Helper function to determine if this SyncEntity's properties indicate that it
32 // is the root node.
33 bool IsRoot(const sync_pb::SyncEntity& entity);
34
35 } // namespace syncer
36
37 #endif // SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
OLDNEW
« no previous file with comments | « sync/syncable/syncable_model_neutral_write_transaction.cc ('k') | sync/syncable/syncable_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698