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

Side by Side Diff: sync/internal_api/public/base/model_type.h

Issue 1413233003: Organizing model type, notification type, root tag and model type string in map. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 1 month 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 | « no previous file | sync/syncable/model_type.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 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 // Enumerate the various item subtypes that are supported by sync. 5 // Enumerate the various item subtypes that are supported by sync.
6 // Each sync object is expected to have an immutable object type. 6 // Each sync object is expected to have an immutable object type.
7 // An object's type is inferred from the type of data it holds. 7 // An object's type is inferred from the type of data it holds.
8 8
9 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_ 9 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
10 #define SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_ 10 #define SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
(...skipping 18 matching lines...) Expand all
29 class SyncEntity; 29 class SyncEntity;
30 } 30 }
31 31
32 namespace syncer { 32 namespace syncer {
33 33
34 // TODO(akalin): Move the non-exported functions in this file to a 34 // TODO(akalin): Move the non-exported functions in this file to a
35 // private header. 35 // private header.
36 36
37 // A Java counterpart will be generated for this enum. 37 // A Java counterpart will be generated for this enum.
38 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.sync 38 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.sync
39
40 // |kModelTypeInfoMap| struct entries are in the same order as their definition
41 // in ModelType enum. Don't forget to update the |kModelTypeInfoMap| struct in
42 // model_type.cc when you make changes in ModelType enum.
39 enum ModelType { 43 enum ModelType {
40 // Object type unknown. Objects may transition through 44 // Object type unknown. Objects may transition through
41 // the unknown state during their initial creation, before 45 // the unknown state during their initial creation, before
42 // their properties are set. After deletion, object types 46 // their properties are set. After deletion, object types
43 // are generally preserved. 47 // are generally preserved.
44 UNSPECIFIED, 48 UNSPECIFIED,
45 // A permanent folder whose children may be of mixed 49 // A permanent folder whose children may be of mixed
46 // datatypes (e.g. the "Google Chrome" folder). 50 // datatypes (e.g. the "Google Chrome" folder).
47 TOP_LEVEL_FOLDER, 51 TOP_LEVEL_FOLDER,
48 52
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 350
347 // Returns true if |model_type| supports ordering of sibling entries. 351 // Returns true if |model_type| supports ordering of sibling entries.
348 SYNC_EXPORT bool TypeSupportsOrdering(ModelType model_type); 352 SYNC_EXPORT bool TypeSupportsOrdering(ModelType model_type);
349 353
350 // Returns set of model types that should be backed up before first sync. 354 // Returns set of model types that should be backed up before first sync.
351 SYNC_EXPORT ModelTypeSet BackupTypes(); 355 SYNC_EXPORT ModelTypeSet BackupTypes();
352 356
353 } // namespace syncer 357 } // namespace syncer
354 358
355 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_ 359 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
OLDNEW
« no previous file with comments | « no previous file | sync/syncable/model_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698