OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/sync/engine/syncer_session.h" | 10 #include "chrome/browser/sync/engine/syncer_session.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Utility methods for converting between syncable::Blobs and protobuf byte | 50 // Utility methods for converting between syncable::Blobs and protobuf byte |
51 // fields. | 51 // fields. |
52 static void CopyProtoBytesIntoBlob(const std::string& proto_bytes, | 52 static void CopyProtoBytesIntoBlob(const std::string& proto_bytes, |
53 syncable::Blob* blob); | 53 syncable::Blob* blob); |
54 static bool ProtoBytesEqualsBlob(const std::string& proto_bytes, | 54 static bool ProtoBytesEqualsBlob(const std::string& proto_bytes, |
55 const syncable::Blob& blob); | 55 const syncable::Blob& blob); |
56 static void CopyBlobIntoProtoBytes(const syncable::Blob& blob, | 56 static void CopyBlobIntoProtoBytes(const syncable::Blob& blob, |
57 std::string* proto_bytes); | 57 std::string* proto_bytes); |
58 | 58 |
59 // Extract the name fields from a sync entity. | 59 // Extract the name field from a sync entity. |
60 static syncable::SyncName NameFromSyncEntity(const SyncEntity& entry); | 60 static std::string NameFromSyncEntity(const SyncEntity& entry); |
61 | 61 |
62 // Extract the name fields from a commit entry response. | 62 |
63 static syncable::SyncName NameFromCommitEntryResponse( | 63 // Extract the name field from a commit entry response. |
| 64 static std::string NameFromCommitEntryResponse( |
64 const CommitResponse_EntryResponse& entry); | 65 const CommitResponse_EntryResponse& entry); |
65 | 66 |
66 private: | 67 private: |
67 SyncerProtoUtil() {} | 68 SyncerProtoUtil() {} |
68 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); | 69 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace browser_sync | 72 } // namespace browser_sync |
72 | 73 |
73 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ | 74 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ |
OLD | NEW |