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 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/base/sync_export.h" |
9 #include "sync/internal_api/public/base/model_type.h" | 9 #include "sync/internal_api/public/base/model_type.h" |
10 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void PutNonUniqueName(const std::string& value); | 52 void PutNonUniqueName(const std::string& value); |
53 void PutSpecifics(const sync_pb::EntitySpecifics& value); | 53 void PutSpecifics(const sync_pb::EntitySpecifics& value); |
54 void PutUniquePosition(const UniquePosition& value); | 54 void PutUniquePosition(const UniquePosition& value); |
55 | 55 |
56 // Sets the position of this item, and updates the entry kernels of the | 56 // Sets the position of this item, and updates the entry kernels of the |
57 // adjacent siblings so that list invariants are maintained. Returns false | 57 // adjacent siblings so that list invariants are maintained. Returns false |
58 // and fails if |predecessor_id| does not identify a sibling. Pass the root | 58 // and fails if |predecessor_id| does not identify a sibling. Pass the root |
59 // ID to put the node in first position. | 59 // ID to put the node in first position. |
60 bool PutPredecessor(const Id& predecessor_id); | 60 bool PutPredecessor(const Id& predecessor_id); |
61 | 61 |
| 62 void PutAttachmentMetadata( |
| 63 const sync_pb::AttachmentMetadata& attachment_metadata); |
| 64 |
62 private: | 65 private: |
63 // Kind of redundant. We should reduce the number of pointers | 66 // Kind of redundant. We should reduce the number of pointers |
64 // floating around if at all possible. Could we store this in Directory? | 67 // floating around if at all possible. Could we store this in Directory? |
65 // Scope: Set on construction, never changed after that. | 68 // Scope: Set on construction, never changed after that. |
66 WriteTransaction* const write_transaction_; | 69 WriteTransaction* const write_transaction_; |
67 | 70 |
68 DISALLOW_COPY_AND_ASSIGN(MutableEntry); | 71 DISALLOW_COPY_AND_ASSIGN(MutableEntry); |
69 }; | 72 }; |
70 | 73 |
71 // This function sets only the flags needed to get this entry to sync. | 74 // This function sets only the flags needed to get this entry to sync. |
72 bool MarkForSyncing(syncable::MutableEntry* e); | 75 bool MarkForSyncing(syncable::MutableEntry* e); |
73 | 76 |
74 } // namespace syncable | 77 } // namespace syncable |
75 } // namespace syncer | 78 } // namespace syncer |
76 | 79 |
77 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 80 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
OLD | NEW |