| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 SYNC_SYNCABLE_ENTRY_H_ | 5 #ifndef SYNC_SYNCABLE_ENTRY_H_ |
| 6 #define SYNC_SYNCABLE_ENTRY_H_ | 6 #define SYNC_SYNCABLE_ENTRY_H_ |
| 7 | 7 |
| 8 #include "sync/base/sync_export.h" |
| 8 #include "sync/syncable/entry_kernel.h" | 9 #include "sync/syncable/entry_kernel.h" |
| 9 | 10 |
| 10 namespace syncer { | 11 namespace syncer { |
| 11 class Cryptographer; | 12 class Cryptographer; |
| 12 class ReadNode; | 13 class ReadNode; |
| 13 | 14 |
| 14 namespace syncable { | 15 namespace syncable { |
| 15 | 16 |
| 16 class Directory; | 17 class Directory; |
| 17 class BaseTransaction; | 18 class BaseTransaction; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 }; | 35 }; |
| 35 | 36 |
| 36 enum GetByServerTag { | 37 enum GetByServerTag { |
| 37 GET_BY_SERVER_TAG | 38 GET_BY_SERVER_TAG |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 enum GetByHandle { | 41 enum GetByHandle { |
| 41 GET_BY_HANDLE | 42 GET_BY_HANDLE |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 class Entry { | 45 class SYNC_EXPORT Entry { |
| 45 public: | 46 public: |
| 46 // After constructing, you must check good() to test whether the Get | 47 // After constructing, you must check good() to test whether the Get |
| 47 // succeeded. | 48 // succeeded. |
| 48 Entry(BaseTransaction* trans, GetByHandle, int64 handle); | 49 Entry(BaseTransaction* trans, GetByHandle, int64 handle); |
| 49 Entry(BaseTransaction* trans, GetById, const Id& id); | 50 Entry(BaseTransaction* trans, GetById, const Id& id); |
| 50 Entry(BaseTransaction* trans, GetByServerTag, const std::string& tag); | 51 Entry(BaseTransaction* trans, GetByServerTag, const std::string& tag); |
| 51 Entry(BaseTransaction* trans, GetByClientTag, const std::string& tag); | 52 Entry(BaseTransaction* trans, GetByClientTag, const std::string& tag); |
| 52 | 53 |
| 53 bool good() const { return 0 != kernel_; } | 54 bool good() const { return 0 != kernel_; } |
| 54 | 55 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 DISALLOW_COPY_AND_ASSIGN(Entry); | 151 DISALLOW_COPY_AND_ASSIGN(Entry); |
| 151 }; | 152 }; |
| 152 | 153 |
| 153 std::ostream& operator<<(std::ostream& os, const Entry& entry); | 154 std::ostream& operator<<(std::ostream& os, const Entry& entry); |
| 154 | 155 |
| 155 } // namespace syncable | 156 } // namespace syncable |
| 156 } // namespace syncer | 157 } // namespace syncer |
| 157 | 158 |
| 158 #endif // SYNC_SYNCABLE_ENTRY_H_ | 159 #endif // SYNC_SYNCABLE_ENTRY_H_ |
| OLD | NEW |