Revert of Implement IPC::ParamTraits<mojo::MessagePipeHandle> (patchset #4 id:60001...
[chromium-blink-merge.git] / sync / internal_api / syncapi_internal.h
blobacb1631be4989bfc96d9f2648720270a3de876c6
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.
5 #ifndef SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
6 #define SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_
8 // The functions defined are shared among some of the classes that implement
9 // the internal sync API. They are not to be used by clients of the API.
11 #include <string>
13 #include "sync/base/sync_export.h"
15 namespace sync_pb {
16 class AttachmentMetadata;
17 class EntitySpecifics;
18 class PasswordSpecificsData;
21 namespace syncer {
23 class Cryptographer;
25 sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics(
26 const sync_pb::EntitySpecifics& specifics,
27 Cryptographer* crypto);
29 SYNC_EXPORT void SyncAPINameToServerName(const std::string& syncer_name,
30 std::string* out);
31 SYNC_EXPORT void ServerNameToSyncAPIName(const std::string& server_name,
32 std::string* out);
34 bool IsNameServerIllegalAfterTrimming(const std::string& name);
36 bool AreSpecificsEqual(const Cryptographer* cryptographer,
37 const sync_pb::EntitySpecifics& left,
38 const sync_pb::EntitySpecifics& right);
40 // Return true iff |left| and |right| are equal.
41 bool AreAttachmentMetadataEqual(const sync_pb::AttachmentMetadata& left,
42 const sync_pb::AttachmentMetadata& right);
44 } // namespace syncer
46 #endif // SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_