OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "sync/internal_api/public/base/model_type.h" | 5 #include "sync/internal_api/public/base/model_type.h" |
6 | 6 |
7 #include "base/strings/string_split.h" | 7 #include "base/strings/string_split.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "sync/protocol/app_notification_specifics.pb.h" | 9 #include "sync/protocol/app_notification_specifics.pb.h" |
10 #include "sync/protocol/app_setting_specifics.pb.h" | 10 #include "sync/protocol/app_setting_specifics.pb.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 ModelTypeSet PriorityCoreTypes() { | 431 ModelTypeSet PriorityCoreTypes() { |
432 syncer::ModelTypeSet result; | 432 syncer::ModelTypeSet result; |
433 result.PutAll(ControlTypes()); | 433 result.PutAll(ControlTypes()); |
434 | 434 |
435 // The following are non-control core types. | 435 // The following are non-control core types. |
436 result.Put(MANAGED_USERS); | 436 result.Put(MANAGED_USERS); |
437 | 437 |
438 return result; | 438 return result; |
439 } | 439 } |
440 | 440 |
441 ModelTypeSet BackupTypes() { | |
442 ModelTypeSet result; | |
443 result.Put(BOOKMARKS); | |
444 result.Put(PREFERENCES); | |
445 result.Put(THEMES); | |
446 result.Put(EXTENSIONS); | |
447 result.Put(SEARCH_ENGINES); | |
448 result.Put(APPS); | |
449 result.Put(APP_SETTINGS); | |
450 result.Put(EXTENSION_SETTINGS); | |
Nicolas Zea
2014/04/14 21:36:31
Extension settings and app settings don't need to
haitaol1
2014/04/15 00:19:06
Per offline discussion, back them up to simulate s
| |
451 result.Put(PRIORITY_PREFERENCES); | |
452 return result; | |
453 } | |
454 | |
441 const char* ModelTypeToString(ModelType model_type) { | 455 const char* ModelTypeToString(ModelType model_type) { |
442 // This is used in serialization routines as well as for displaying debug | 456 // This is used in serialization routines as well as for displaying debug |
443 // information. Do not attempt to change these string values unless you know | 457 // information. Do not attempt to change these string values unless you know |
444 // what you're doing. | 458 // what you're doing. |
445 switch (model_type) { | 459 switch (model_type) { |
446 case TOP_LEVEL_FOLDER: | 460 case TOP_LEVEL_FOLDER: |
447 return "Top Level Folder"; | 461 return "Top Level Folder"; |
448 case UNSPECIFIED: | 462 case UNSPECIFIED: |
449 return "Unspecified"; | 463 return "Unspecified"; |
450 case BOOKMARKS: | 464 case BOOKMARKS: |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1040 | 1054 |
1041 bool IsRealDataType(ModelType model_type) { | 1055 bool IsRealDataType(ModelType model_type) { |
1042 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT; | 1056 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT; |
1043 } | 1057 } |
1044 | 1058 |
1045 bool IsActOnceDataType(ModelType model_type) { | 1059 bool IsActOnceDataType(ModelType model_type) { |
1046 return model_type == HISTORY_DELETE_DIRECTIVES; | 1060 return model_type == HISTORY_DELETE_DIRECTIVES; |
1047 } | 1061 } |
1048 | 1062 |
1049 } // namespace syncer | 1063 } // namespace syncer |
OLD | NEW |