| 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 COMPONENTS_SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| 6 #define SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "sync/base/sync_export.h" | 13 #include "components/sync/base/model_type.h" |
| 14 #include "sync/internal_api/public/base/model_type.h" | 14 #include "components/sync/base/sync_export.h" |
| 15 #include "sync/syncable/entry.h" | 15 #include "components/sync/syncable/entry.h" |
| 16 #include "sync/syncable/metahandle_set.h" | 16 #include "components/sync/syncable/metahandle_set.h" |
| 17 #include "sync/syncable/model_neutral_mutable_entry.h" | 17 #include "components/sync/syncable/model_neutral_mutable_entry.h" |
| 18 | 18 |
| 19 namespace syncer { | 19 namespace syncer { |
| 20 class WriteNode; | 20 class WriteNode; |
| 21 | 21 |
| 22 namespace syncable { | 22 namespace syncable { |
| 23 | 23 |
| 24 enum Create { | 24 enum Create { CREATE }; |
| 25 CREATE | |
| 26 }; | |
| 27 | 25 |
| 28 class WriteTransaction; | 26 class WriteTransaction; |
| 29 | 27 |
| 30 // 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 |
| 31 // WriteTransaction is destroyed. | 29 // WriteTransaction is destroyed. |
| 32 class SYNC_EXPORT MutableEntry : public ModelNeutralMutableEntry { | 30 class SYNC_EXPORT MutableEntry : public ModelNeutralMutableEntry { |
| 33 void Init(WriteTransaction* trans, ModelType model_type, | 31 void Init(WriteTransaction* trans, |
| 34 const Id& parent_id, const std::string& name); | 32 ModelType model_type, |
| 33 const Id& parent_id, |
| 34 const std::string& name); |
| 35 | 35 |
| 36 public: | 36 public: |
| 37 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); | 37 MutableEntry(WriteTransaction* trans, CreateNewUpdateItem, const Id& id); |
| 38 MutableEntry(WriteTransaction* trans, | 38 MutableEntry(WriteTransaction* trans, |
| 39 Create, | 39 Create, |
| 40 ModelType model_type, | 40 ModelType model_type, |
| 41 const std::string& name); | 41 const std::string& name); |
| 42 MutableEntry(WriteTransaction* trans, | 42 MutableEntry(WriteTransaction* trans, |
| 43 Create, | 43 Create, |
| 44 ModelType model_type, | 44 ModelType model_type, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(MutableEntry); | 87 DISALLOW_COPY_AND_ASSIGN(MutableEntry); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 // This function sets only the flags needed to get this entry to sync. | 90 // This function sets only the flags needed to get this entry to sync. |
| 91 bool MarkForSyncing(syncable::MutableEntry* e); | 91 bool MarkForSyncing(syncable::MutableEntry* e); |
| 92 | 92 |
| 93 } // namespace syncable | 93 } // namespace syncable |
| 94 } // namespace syncer | 94 } // namespace syncer |
| 95 | 95 |
| 96 #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ | 96 #endif // COMPONENTS_SYNC_SYNCABLE_MUTABLE_ENTRY_H_ |
| OLD | NEW |