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

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

Issue 10735041: Remove syncproto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve DCHECKing, fix tests Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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 SYNCABLE_PROTOCOL_PROTO_UTIL_H_
6 #define SYNCABLE_PROTOCOL_PROTO_UTIL_H_
7 #pragma once
8
9 #include "sync/syncable/syncable_id.h"
10
11 namespace sync_pb {
12 class SyncEntity;
13 }
14
15 namespace syncer {
16
17 // Converts from a specially formatted string field to a syncable::Id. Used
18 // when interpreting the fields of protocol buffers received from the server.
19 syncable::Id SyncableIdFromProto(const std::string& proto_string);
20
21 // Converts from a syncable::Id to a formatted std::string. This is useful for
22 // populating the fields of a protobuf which will be sent to the server.
23 std::string SyncableIdToProto(const syncable::Id& syncable_id);
24
25 // Helper function to determine if this SyncEntity's properties indicate that it
26 // is a folder.
27 bool IsFolder(const sync_pb::SyncEntity& entity);
28
29 // Helper function to determine if this SyncEntity's properties indicate that it
30 // is the root node.
31 bool IsRoot(const sync_pb::SyncEntity& entity);
32
33 } // namespace syncer
34
35 #endif // SYNCABLE_PROTOCOL_PROTO_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698