Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: sync/syncable/model_neutral_mutable_entry.h

Issue 867793003: Remove dependency on server generated type root folders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added extra comment about existing type root folder. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sync/syncable/entry_kernel.cc ('k') | sync/syncable/model_neutral_mutable_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 5 #ifndef SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
6 #define SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 6 #define SYNC_SYNCABLE_MODEL_NEUTRAL_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"
11 11
12 namespace syncer { 12 namespace syncer {
13 class WriteNode; 13 class WriteNode;
14 14
15 namespace syncable { 15 namespace syncable {
16 16
17 class BaseWriteTransaction; 17 class BaseWriteTransaction;
18 18
19 enum CreateNewUpdateItem { 19 enum CreateNewUpdateItem {
20 CREATE_NEW_UPDATE_ITEM 20 CREATE_NEW_UPDATE_ITEM
21 }; 21 };
22 22
23 enum CreateNewTypeRoot { CREATE_NEW_TYPE_ROOT };
24
23 // This Entry includes all the operations one can safely perform on the sync 25 // This Entry includes all the operations one can safely perform on the sync
24 // thread. In particular, it does not expose setters to make changes that need 26 // thread. In particular, it does not expose setters to make changes that need
25 // to be communicated to the model (and the model's thread). It is not possible 27 // to be communicated to the model (and the model's thread). It is not possible
26 // to change an entry's SPECIFICS or UNIQUE_POSITION fields with this kind of 28 // to change an entry's SPECIFICS or UNIQUE_POSITION fields with this kind of
27 // entry. 29 // entry.
28 class SYNC_EXPORT_PRIVATE ModelNeutralMutableEntry : public Entry { 30 class SYNC_EXPORT_PRIVATE ModelNeutralMutableEntry : public Entry {
29 public: 31 public:
30 ModelNeutralMutableEntry(BaseWriteTransaction* trans, 32 ModelNeutralMutableEntry(BaseWriteTransaction* trans,
31 CreateNewUpdateItem, 33 CreateNewUpdateItem,
32 const Id& id); 34 const Id& id);
35 ModelNeutralMutableEntry(BaseWriteTransaction* trans,
36 CreateNewTypeRoot,
37 ModelType type);
33 ModelNeutralMutableEntry(BaseWriteTransaction* trans, GetByHandle, int64); 38 ModelNeutralMutableEntry(BaseWriteTransaction* trans, GetByHandle, int64);
34 ModelNeutralMutableEntry(BaseWriteTransaction* trans, GetById, const Id&); 39 ModelNeutralMutableEntry(BaseWriteTransaction* trans, GetById, const Id&);
35 ModelNeutralMutableEntry( 40 ModelNeutralMutableEntry(
36 BaseWriteTransaction* trans, 41 BaseWriteTransaction* trans,
37 GetByClientTag, 42 GetByClientTag,
38 const std::string& tag); 43 const std::string& tag);
39 ModelNeutralMutableEntry( 44 ModelNeutralMutableEntry(
40 BaseWriteTransaction* trans, 45 BaseWriteTransaction* trans,
41 GetTypeRoot, 46 GetTypeRoot,
42 ModelType type); 47 ModelType type);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Scope: Set on construction, never changed after that. 113 // Scope: Set on construction, never changed after that.
109 BaseWriteTransaction* const base_write_transaction_; 114 BaseWriteTransaction* const base_write_transaction_;
110 115
111 DISALLOW_COPY_AND_ASSIGN(ModelNeutralMutableEntry); 116 DISALLOW_COPY_AND_ASSIGN(ModelNeutralMutableEntry);
112 }; 117 };
113 118
114 } // namespace syncable 119 } // namespace syncable
115 } // namespace syncer 120 } // namespace syncer
116 121
117 #endif // SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_ 122 #endif // SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
OLDNEW
« no previous file with comments | « sync/syncable/entry_kernel.cc ('k') | sync/syncable/model_neutral_mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698