OLD | NEW |
1 // Copyright 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 COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "components/sync/base/sync_export.h" | |
16 #include "components/sync/syncable/entry_kernel.h" | 15 #include "components/sync/syncable/entry_kernel.h" |
17 | 16 |
18 namespace syncer { | 17 namespace syncer { |
19 class Cryptographer; | 18 class Cryptographer; |
20 class ReadNode; | 19 class ReadNode; |
21 | 20 |
22 namespace syncable { | 21 namespace syncable { |
23 | 22 |
24 class Directory; | 23 class Directory; |
25 class BaseTransaction; | 24 class BaseTransaction; |
(...skipping 13 matching lines...) Expand all Loading... |
39 | 38 |
40 enum GetByServerTag { | 39 enum GetByServerTag { |
41 // Server tagged items are deprecated for all types but bookmarks. | 40 // Server tagged items are deprecated for all types but bookmarks. |
42 GET_BY_SERVER_TAG | 41 GET_BY_SERVER_TAG |
43 }; | 42 }; |
44 | 43 |
45 enum GetTypeRoot { GET_TYPE_ROOT }; | 44 enum GetTypeRoot { GET_TYPE_ROOT }; |
46 | 45 |
47 enum GetByHandle { GET_BY_HANDLE }; | 46 enum GetByHandle { GET_BY_HANDLE }; |
48 | 47 |
49 class SYNC_EXPORT Entry { | 48 class Entry { |
50 public: | 49 public: |
51 // After constructing, you must check good() to test whether the Get | 50 // After constructing, you must check good() to test whether the Get |
52 // succeeded. | 51 // succeeded. |
53 Entry(BaseTransaction* trans, GetByHandle, int64_t handle); | 52 Entry(BaseTransaction* trans, GetByHandle, int64_t handle); |
54 Entry(BaseTransaction* trans, GetById, const Id& id); | 53 Entry(BaseTransaction* trans, GetById, const Id& id); |
55 Entry(BaseTransaction* trans, GetTypeRoot, ModelType type); | 54 Entry(BaseTransaction* trans, GetTypeRoot, ModelType type); |
56 Entry(BaseTransaction* trans, GetByClientTag, const std::string& tag); | 55 Entry(BaseTransaction* trans, GetByClientTag, const std::string& tag); |
57 | 56 |
58 // This lookup function is deprecated. All types except bookmarks can use | 57 // This lookup function is deprecated. All types except bookmarks can use |
59 // the GetTypeRoot variant instead. | 58 // the GetTypeRoot variant instead. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 276 |
278 DISALLOW_COPY_AND_ASSIGN(Entry); | 277 DISALLOW_COPY_AND_ASSIGN(Entry); |
279 }; | 278 }; |
280 | 279 |
281 std::ostream& operator<<(std::ostream& os, const Entry& entry); | 280 std::ostream& operator<<(std::ostream& os, const Entry& entry); |
282 | 281 |
283 } // namespace syncable | 282 } // namespace syncable |
284 } // namespace syncer | 283 } // namespace syncer |
285 | 284 |
286 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ | 285 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_H_ |
OLD | NEW |