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_MUTABLE_ENTRY_H_ | 5 #ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
7 | 7 |
| 8 #include "sync/base/sync_export.h" |
8 #include "sync/internal_api/public/base/node_ordinal.h" | 9 #include "sync/internal_api/public/base/node_ordinal.h" |
9 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
10 #include "sync/syncable/metahandle_set.h" | 11 #include "sync/syncable/metahandle_set.h" |
11 | 12 |
12 namespace syncer { | 13 namespace syncer { |
13 class WriteNode; | 14 class WriteNode; |
14 | 15 |
15 namespace syncable { | 16 namespace syncable { |
16 | 17 |
17 class WriteTransaction; | 18 class WriteTransaction; |
18 | 19 |
19 enum Create { | 20 enum Create { |
20 CREATE | 21 CREATE |
21 }; | 22 }; |
22 | 23 |
23 enum CreateNewUpdateItem { | 24 enum CreateNewUpdateItem { |
24 CREATE_NEW_UPDATE_ITEM | 25 CREATE_NEW_UPDATE_ITEM |
25 }; | 26 }; |
26 | 27 |
27 // A mutable meta entry. Changes get committed to the database when the | 28 // A mutable meta entry. Changes get committed to the database when the |
28 // WriteTransaction is destroyed. | 29 // WriteTransaction is destroyed. |
29 class MutableEntry : public Entry { | 30 class SYNC_EXPORT_PRIVATE MutableEntry : public Entry { |
30 void Init(WriteTransaction* trans, const Id& parent_id, | 31 void Init(WriteTransaction* trans, const Id& parent_id, |
31 const std::string& name); | 32 const std::string& name); |
32 | 33 |
33 public: | 34 public: |
34 MutableEntry(WriteTransaction* trans, Create, const Id& parent_id, | 35 MutableEntry(WriteTransaction* trans, Create, const Id& parent_id, |
35 const std::string& name); | 36 const std::string& name); |
36 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); | 37 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); |
37 MutableEntry(WriteTransaction* trans, GetByHandle, int64); | 38 MutableEntry(WriteTransaction* trans, GetByHandle, int64); |
38 MutableEntry(WriteTransaction* trans, GetById, const Id&); | 39 MutableEntry(WriteTransaction* trans, GetById, const Id&); |
39 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); | 40 MutableEntry(WriteTransaction* trans, GetByClientTag, const std::string& tag); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 DISALLOW_COPY_AND_ASSIGN(MutableEntry); | 112 DISALLOW_COPY_AND_ASSIGN(MutableEntry); |
112 }; | 113 }; |
113 | 114 |
114 // This function sets only the flags needed to get this entry to sync. | 115 // This function sets only the flags needed to get this entry to sync. |
115 bool MarkForSyncing(syncable::MutableEntry* e); | 116 bool MarkForSyncing(syncable::MutableEntry* e); |
116 | 117 |
117 } // namespace syncable | 118 } // namespace syncable |
118 } // namespace syncer | 119 } // namespace syncer |
119 | 120 |
120 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 121 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
OLD | NEW |