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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 break; | 79 break; |
80 case APP_NOTIFICATIONS: | 80 case APP_NOTIFICATIONS: |
81 specifics->mutable_app_notification(); | 81 specifics->mutable_app_notification(); |
82 break; | 82 break; |
83 case HISTORY_DELETE_DIRECTIVES: | 83 case HISTORY_DELETE_DIRECTIVES: |
84 specifics->mutable_history_delete_directive(); | 84 specifics->mutable_history_delete_directive(); |
85 break; | 85 break; |
86 case SYNCED_NOTIFICATIONS: | 86 case SYNCED_NOTIFICATIONS: |
87 specifics->mutable_synced_notification(); | 87 specifics->mutable_synced_notification(); |
88 break; | 88 break; |
89 case SYNCED_NOTIFICATION_APP_INFO: | |
90 specifics->mutable_synced_notification_app_info(); | |
91 break; | |
89 case DEVICE_INFO: | 92 case DEVICE_INFO: |
90 specifics->mutable_device_info(); | 93 specifics->mutable_device_info(); |
91 break; | 94 break; |
92 case EXPERIMENTS: | 95 case EXPERIMENTS: |
93 specifics->mutable_experiments(); | 96 specifics->mutable_experiments(); |
94 break; | 97 break; |
95 case PRIORITY_PREFERENCES: | 98 case PRIORITY_PREFERENCES: |
96 specifics->mutable_priority_preference(); | 99 specifics->mutable_priority_preference(); |
97 break; | 100 break; |
98 case DICTIONARY: | 101 case DICTIONARY: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 case EXTENSION_SETTINGS: | 185 case EXTENSION_SETTINGS: |
183 return sync_pb::EntitySpecifics::kExtensionSettingFieldNumber; | 186 return sync_pb::EntitySpecifics::kExtensionSettingFieldNumber; |
184 break; | 187 break; |
185 case APP_NOTIFICATIONS: | 188 case APP_NOTIFICATIONS: |
186 return sync_pb::EntitySpecifics::kAppNotificationFieldNumber; | 189 return sync_pb::EntitySpecifics::kAppNotificationFieldNumber; |
187 break; | 190 break; |
188 case HISTORY_DELETE_DIRECTIVES: | 191 case HISTORY_DELETE_DIRECTIVES: |
189 return sync_pb::EntitySpecifics::kHistoryDeleteDirectiveFieldNumber; | 192 return sync_pb::EntitySpecifics::kHistoryDeleteDirectiveFieldNumber; |
190 case SYNCED_NOTIFICATIONS: | 193 case SYNCED_NOTIFICATIONS: |
191 return sync_pb::EntitySpecifics::kSyncedNotificationFieldNumber; | 194 return sync_pb::EntitySpecifics::kSyncedNotificationFieldNumber; |
195 case SYNCED_NOTIFICATION_APP_INFO: | |
196 return sync_pb::EntitySpecifics::kSyncedNotificationAppInfoFieldNumber; | |
192 case DEVICE_INFO: | 197 case DEVICE_INFO: |
193 return sync_pb::EntitySpecifics::kDeviceInfoFieldNumber; | 198 return sync_pb::EntitySpecifics::kDeviceInfoFieldNumber; |
194 break; | 199 break; |
195 case EXPERIMENTS: | 200 case EXPERIMENTS: |
196 return sync_pb::EntitySpecifics::kExperimentsFieldNumber; | 201 return sync_pb::EntitySpecifics::kExperimentsFieldNumber; |
197 break; | 202 break; |
198 case PRIORITY_PREFERENCES: | 203 case PRIORITY_PREFERENCES: |
199 return sync_pb::EntitySpecifics::kPriorityPreferenceFieldNumber; | 204 return sync_pb::EntitySpecifics::kPriorityPreferenceFieldNumber; |
200 break; | 205 break; |
201 case DICTIONARY: | 206 case DICTIONARY: |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 | 309 |
305 if (specifics.has_app_notification()) | 310 if (specifics.has_app_notification()) |
306 return APP_NOTIFICATIONS; | 311 return APP_NOTIFICATIONS; |
307 | 312 |
308 if (specifics.has_history_delete_directive()) | 313 if (specifics.has_history_delete_directive()) |
309 return HISTORY_DELETE_DIRECTIVES; | 314 return HISTORY_DELETE_DIRECTIVES; |
310 | 315 |
311 if (specifics.has_synced_notification()) | 316 if (specifics.has_synced_notification()) |
312 return SYNCED_NOTIFICATIONS; | 317 return SYNCED_NOTIFICATIONS; |
313 | 318 |
319 if (specifics.has_synced_notification_app_info()) | |
320 return SYNCED_NOTIFICATION_APP_INFO; | |
321 | |
314 if (specifics.has_device_info()) | 322 if (specifics.has_device_info()) |
315 return DEVICE_INFO; | 323 return DEVICE_INFO; |
316 | 324 |
317 if (specifics.has_experiments()) | 325 if (specifics.has_experiments()) |
318 return EXPERIMENTS; | 326 return EXPERIMENTS; |
319 | 327 |
320 if (specifics.has_priority_preference()) | 328 if (specifics.has_priority_preference()) |
321 return PRIORITY_PREFERENCES; | 329 return PRIORITY_PREFERENCES; |
322 | 330 |
323 if (specifics.has_dictionary()) | 331 if (specifics.has_dictionary()) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 bool IsUserSelectableType(ModelType model_type) { | 388 bool IsUserSelectableType(ModelType model_type) { |
381 return UserSelectableTypes().Has(model_type); | 389 return UserSelectableTypes().Has(model_type); |
382 } | 390 } |
383 | 391 |
384 ModelTypeSet EncryptableUserTypes() { | 392 ModelTypeSet EncryptableUserTypes() { |
385 ModelTypeSet encryptable_user_types = UserTypes(); | 393 ModelTypeSet encryptable_user_types = UserTypes(); |
386 // We never encrypt history delete directives. | 394 // We never encrypt history delete directives. |
387 encryptable_user_types.Remove(HISTORY_DELETE_DIRECTIVES); | 395 encryptable_user_types.Remove(HISTORY_DELETE_DIRECTIVES); |
388 // Synced notifications are not encrypted since the server must see changes. | 396 // Synced notifications are not encrypted since the server must see changes. |
389 encryptable_user_types.Remove(SYNCED_NOTIFICATIONS); | 397 encryptable_user_types.Remove(SYNCED_NOTIFICATIONS); |
398 // Synced Notification App Info does not have private data, so it is not | |
399 // encrypted. | |
400 encryptable_user_types.Remove(SYNCED_NOTIFICATION_APP_INFO); | |
390 // Priority preferences are not encrypted because they might be synced before | 401 // Priority preferences are not encrypted because they might be synced before |
391 // encryption is ready. | 402 // encryption is ready. |
392 encryptable_user_types.Remove(PRIORITY_PREFERENCES); | 403 encryptable_user_types.Remove(PRIORITY_PREFERENCES); |
393 // Managed user settings are not encrypted since they are set server-side. | 404 // Managed user settings are not encrypted since they are set server-side. |
394 encryptable_user_types.Remove(MANAGED_USER_SETTINGS); | 405 encryptable_user_types.Remove(MANAGED_USER_SETTINGS); |
395 // Managed users are not encrypted since they are managed server-side. | 406 // Managed users are not encrypted since they are managed server-side. |
396 encryptable_user_types.Remove(MANAGED_USERS); | 407 encryptable_user_types.Remove(MANAGED_USERS); |
397 // Managed user shared settings are not encrypted since they are managed | 408 // Managed user shared settings are not encrypted since they are managed |
398 // server-side and shared between manager and supervised user. | 409 // server-side and shared between manager and supervised user. |
399 encryptable_user_types.Remove(MANAGED_USER_SHARED_SETTINGS); | 410 encryptable_user_types.Remove(MANAGED_USER_SHARED_SETTINGS); |
(...skipping 29 matching lines...) Expand all Loading... | |
429 bool IsControlType(ModelType model_type) { | 440 bool IsControlType(ModelType model_type) { |
430 return ControlTypes().Has(model_type); | 441 return ControlTypes().Has(model_type); |
431 } | 442 } |
432 | 443 |
433 ModelTypeSet CoreTypes() { | 444 ModelTypeSet CoreTypes() { |
434 syncer::ModelTypeSet result; | 445 syncer::ModelTypeSet result; |
435 result.PutAll(PriorityCoreTypes()); | 446 result.PutAll(PriorityCoreTypes()); |
436 | 447 |
437 // The following are low priority core types. | 448 // The following are low priority core types. |
438 result.Put(SYNCED_NOTIFICATIONS); | 449 result.Put(SYNCED_NOTIFICATIONS); |
450 result.Put(SYNCED_NOTIFICATION_APP_INFO); | |
439 | 451 |
440 return result; | 452 return result; |
441 } | 453 } |
442 | 454 |
443 ModelTypeSet PriorityCoreTypes() { | 455 ModelTypeSet PriorityCoreTypes() { |
444 syncer::ModelTypeSet result; | 456 syncer::ModelTypeSet result; |
445 result.PutAll(ControlTypes()); | 457 result.PutAll(ControlTypes()); |
446 | 458 |
447 // The following are non-control core types. | 459 // The following are non-control core types. |
448 result.Put(MANAGED_USERS); | 460 result.Put(MANAGED_USERS); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
488 case APP_SETTINGS: | 500 case APP_SETTINGS: |
489 return "App settings"; | 501 return "App settings"; |
490 case EXTENSION_SETTINGS: | 502 case EXTENSION_SETTINGS: |
491 return "Extension settings"; | 503 return "Extension settings"; |
492 case APP_NOTIFICATIONS: | 504 case APP_NOTIFICATIONS: |
493 return "App Notifications"; | 505 return "App Notifications"; |
494 case HISTORY_DELETE_DIRECTIVES: | 506 case HISTORY_DELETE_DIRECTIVES: |
495 return "History Delete Directives"; | 507 return "History Delete Directives"; |
496 case SYNCED_NOTIFICATIONS: | 508 case SYNCED_NOTIFICATIONS: |
497 return "Synced Notifications"; | 509 return "Synced Notifications"; |
510 case SYNCED_NOTIFICATION_APP_INFO: | |
511 return "SyncedNotificationAppInfo"; | |
Nicolas Zea
2014/01/28 08:21:03
Spaces between words (should be reversible with Mo
| |
498 case DEVICE_INFO: | 512 case DEVICE_INFO: |
499 return "Device Info"; | 513 return "Device Info"; |
500 case EXPERIMENTS: | 514 case EXPERIMENTS: |
501 return "Experiments"; | 515 return "Experiments"; |
502 case PRIORITY_PREFERENCES: | 516 case PRIORITY_PREFERENCES: |
503 return "Priority Preferences"; | 517 return "Priority Preferences"; |
504 case DICTIONARY: | 518 case DICTIONARY: |
505 return "Dictionary"; | 519 return "Dictionary"; |
506 case FAVICON_IMAGES: | 520 case FAVICON_IMAGES: |
507 return "Favicon Images"; | 521 return "Favicon Images"; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
585 case MANAGED_USER_SETTINGS: | 599 case MANAGED_USER_SETTINGS: |
586 return 26; | 600 return 26; |
587 case MANAGED_USERS: | 601 case MANAGED_USERS: |
588 return 27; | 602 return 27; |
589 case ARTICLES: | 603 case ARTICLES: |
590 return 28; | 604 return 28; |
591 case APP_LIST: | 605 case APP_LIST: |
592 return 29; | 606 return 29; |
593 case MANAGED_USER_SHARED_SETTINGS: | 607 case MANAGED_USER_SHARED_SETTINGS: |
594 return 30; | 608 return 30; |
609 case SYNCED_NOTIFICATION_APP_INFO: | |
610 return 31; | |
595 // Silence a compiler warning. | 611 // Silence a compiler warning. |
596 case MODEL_TYPE_COUNT: | 612 case MODEL_TYPE_COUNT: |
597 return 0; | 613 return 0; |
598 } | 614 } |
599 return 0; | 615 return 0; |
600 } | 616 } |
601 | 617 |
602 base::StringValue* ModelTypeToValue(ModelType model_type) { | 618 base::StringValue* ModelTypeToValue(ModelType model_type) { |
603 if (model_type >= FIRST_REAL_MODEL_TYPE) { | 619 if (model_type >= FIRST_REAL_MODEL_TYPE) { |
604 return new base::StringValue(ModelTypeToString(model_type)); | 620 return new base::StringValue(ModelTypeToString(model_type)); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
656 else if (model_type_string == "App settings") | 672 else if (model_type_string == "App settings") |
657 return APP_SETTINGS; | 673 return APP_SETTINGS; |
658 else if (model_type_string == "Extension settings") | 674 else if (model_type_string == "Extension settings") |
659 return EXTENSION_SETTINGS; | 675 return EXTENSION_SETTINGS; |
660 else if (model_type_string == "App Notifications") | 676 else if (model_type_string == "App Notifications") |
661 return APP_NOTIFICATIONS; | 677 return APP_NOTIFICATIONS; |
662 else if (model_type_string == "History Delete Directives") | 678 else if (model_type_string == "History Delete Directives") |
663 return HISTORY_DELETE_DIRECTIVES; | 679 return HISTORY_DELETE_DIRECTIVES; |
664 else if (model_type_string == "Synced Notifications") | 680 else if (model_type_string == "Synced Notifications") |
665 return SYNCED_NOTIFICATIONS; | 681 return SYNCED_NOTIFICATIONS; |
682 else if (model_type_string == "Synced Notification App Info") | |
683 return SYNCED_NOTIFICATION_APP_INFO; | |
666 else if (model_type_string == "Device Info") | 684 else if (model_type_string == "Device Info") |
667 return DEVICE_INFO; | 685 return DEVICE_INFO; |
668 else if (model_type_string == "Experiments") | 686 else if (model_type_string == "Experiments") |
669 return EXPERIMENTS; | 687 return EXPERIMENTS; |
670 else if (model_type_string == "Priority Preferences") | 688 else if (model_type_string == "Priority Preferences") |
671 return PRIORITY_PREFERENCES; | 689 return PRIORITY_PREFERENCES; |
672 else if (model_type_string == "Dictionary") | 690 else if (model_type_string == "Dictionary") |
673 return DICTIONARY; | 691 return DICTIONARY; |
674 else if (model_type_string == "Favicon Images") | 692 else if (model_type_string == "Favicon Images") |
675 return FAVICON_IMAGES; | 693 return FAVICON_IMAGES; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
754 case APP_SETTINGS: | 772 case APP_SETTINGS: |
755 return "google_chrome_app_settings"; | 773 return "google_chrome_app_settings"; |
756 case EXTENSION_SETTINGS: | 774 case EXTENSION_SETTINGS: |
757 return "google_chrome_extension_settings"; | 775 return "google_chrome_extension_settings"; |
758 case APP_NOTIFICATIONS: | 776 case APP_NOTIFICATIONS: |
759 return "google_chrome_app_notifications"; | 777 return "google_chrome_app_notifications"; |
760 case HISTORY_DELETE_DIRECTIVES: | 778 case HISTORY_DELETE_DIRECTIVES: |
761 return "google_chrome_history_delete_directives"; | 779 return "google_chrome_history_delete_directives"; |
762 case SYNCED_NOTIFICATIONS: | 780 case SYNCED_NOTIFICATIONS: |
763 return "google_chrome_synced_notifications"; | 781 return "google_chrome_synced_notifications"; |
782 case SYNCED_NOTIFICATION_APP_INFO: | |
783 return "google_chrome_synced_notification_app_info"; | |
764 case DEVICE_INFO: | 784 case DEVICE_INFO: |
765 return "google_chrome_device_info"; | 785 return "google_chrome_device_info"; |
766 case EXPERIMENTS: | 786 case EXPERIMENTS: |
767 return "google_chrome_experiments"; | 787 return "google_chrome_experiments"; |
768 case PRIORITY_PREFERENCES: | 788 case PRIORITY_PREFERENCES: |
769 return "google_chrome_priority_preferences"; | 789 return "google_chrome_priority_preferences"; |
770 case DICTIONARY: | 790 case DICTIONARY: |
771 return "google_chrome_dictionary"; | 791 return "google_chrome_dictionary"; |
772 case FAVICON_IMAGES: | 792 case FAVICON_IMAGES: |
773 return "google_chrome_favicon_images"; | 793 return "google_chrome_favicon_images"; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
806 const char kAppSettingNotificationType[] = "APP_SETTING"; | 826 const char kAppSettingNotificationType[] = "APP_SETTING"; |
807 const char kAppNotificationType[] = "APP"; | 827 const char kAppNotificationType[] = "APP"; |
808 const char kAppListNotificationType[] = "APP_LIST"; | 828 const char kAppListNotificationType[] = "APP_LIST"; |
809 const char kSearchEngineNotificationType[] = "SEARCH_ENGINE"; | 829 const char kSearchEngineNotificationType[] = "SEARCH_ENGINE"; |
810 const char kSessionNotificationType[] = "SESSION"; | 830 const char kSessionNotificationType[] = "SESSION"; |
811 const char kAutofillProfileNotificationType[] = "AUTOFILL_PROFILE"; | 831 const char kAutofillProfileNotificationType[] = "AUTOFILL_PROFILE"; |
812 const char kAppNotificationNotificationType[] = "APP_NOTIFICATION"; | 832 const char kAppNotificationNotificationType[] = "APP_NOTIFICATION"; |
813 const char kHistoryDeleteDirectiveNotificationType[] = | 833 const char kHistoryDeleteDirectiveNotificationType[] = |
814 "HISTORY_DELETE_DIRECTIVE"; | 834 "HISTORY_DELETE_DIRECTIVE"; |
815 const char kSyncedNotificationType[] = "SYNCED_NOTIFICATION"; | 835 const char kSyncedNotificationType[] = "SYNCED_NOTIFICATION"; |
836 const char kSyncedNotificationAppInfoType[] = "SYNCED_NOTIFICATION_APP_INFO"; | |
816 const char kDeviceInfoNotificationType[] = "DEVICE_INFO"; | 837 const char kDeviceInfoNotificationType[] = "DEVICE_INFO"; |
817 const char kExperimentsNotificationType[] = "EXPERIMENTS"; | 838 const char kExperimentsNotificationType[] = "EXPERIMENTS"; |
818 const char kPriorityPreferenceNotificationType[] = "PRIORITY_PREFERENCE"; | 839 const char kPriorityPreferenceNotificationType[] = "PRIORITY_PREFERENCE"; |
819 const char kDictionaryNotificationType[] = "DICTIONARY"; | 840 const char kDictionaryNotificationType[] = "DICTIONARY"; |
820 const char kFaviconImageNotificationType[] = "FAVICON_IMAGE"; | 841 const char kFaviconImageNotificationType[] = "FAVICON_IMAGE"; |
821 const char kFaviconTrackingNotificationType[] = "FAVICON_TRACKING"; | 842 const char kFaviconTrackingNotificationType[] = "FAVICON_TRACKING"; |
822 const char kManagedUserSettingNotificationType[] = "MANAGED_USER_SETTING"; | 843 const char kManagedUserSettingNotificationType[] = "MANAGED_USER_SETTING"; |
823 const char kManagedUserNotificationType[] = "MANAGED_USER"; | 844 const char kManagedUserNotificationType[] = "MANAGED_USER"; |
824 const char kManagedUserSharedSettingNotificationType[] = | 845 const char kManagedUserSharedSettingNotificationType[] = |
825 "MANAGED_USER_SHARED_SETTING"; | 846 "MANAGED_USER_SHARED_SETTING"; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
876 return true; | 897 return true; |
877 case APP_NOTIFICATIONS: | 898 case APP_NOTIFICATIONS: |
878 *notification_type = kAppNotificationNotificationType; | 899 *notification_type = kAppNotificationNotificationType; |
879 return true; | 900 return true; |
880 case HISTORY_DELETE_DIRECTIVES: | 901 case HISTORY_DELETE_DIRECTIVES: |
881 *notification_type = kHistoryDeleteDirectiveNotificationType; | 902 *notification_type = kHistoryDeleteDirectiveNotificationType; |
882 return true; | 903 return true; |
883 case SYNCED_NOTIFICATIONS: | 904 case SYNCED_NOTIFICATIONS: |
884 *notification_type = kSyncedNotificationType; | 905 *notification_type = kSyncedNotificationType; |
885 return true; | 906 return true; |
907 case SYNCED_NOTIFICATION_APP_INFO: | |
908 *notification_type = kSyncedNotificationAppInfoType; | |
909 return true; | |
886 case DEVICE_INFO: | 910 case DEVICE_INFO: |
887 *notification_type = kDeviceInfoNotificationType; | 911 *notification_type = kDeviceInfoNotificationType; |
888 return true; | 912 return true; |
889 case EXPERIMENTS: | 913 case EXPERIMENTS: |
890 *notification_type = kExperimentsNotificationType; | 914 *notification_type = kExperimentsNotificationType; |
891 return true; | 915 return true; |
892 case PRIORITY_PREFERENCES: | 916 case PRIORITY_PREFERENCES: |
893 *notification_type = kPriorityPreferenceNotificationType; | 917 *notification_type = kPriorityPreferenceNotificationType; |
894 return true; | 918 return true; |
895 case DICTIONARY: | 919 case DICTIONARY: |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
969 return true; | 993 return true; |
970 } else if (notification_type == kAppNotificationNotificationType) { | 994 } else if (notification_type == kAppNotificationNotificationType) { |
971 *model_type = APP_NOTIFICATIONS; | 995 *model_type = APP_NOTIFICATIONS; |
972 return true; | 996 return true; |
973 } else if (notification_type == kHistoryDeleteDirectiveNotificationType) { | 997 } else if (notification_type == kHistoryDeleteDirectiveNotificationType) { |
974 *model_type = HISTORY_DELETE_DIRECTIVES; | 998 *model_type = HISTORY_DELETE_DIRECTIVES; |
975 return true; | 999 return true; |
976 } else if (notification_type == kSyncedNotificationType) { | 1000 } else if (notification_type == kSyncedNotificationType) { |
977 *model_type = SYNCED_NOTIFICATIONS; | 1001 *model_type = SYNCED_NOTIFICATIONS; |
978 return true; | 1002 return true; |
1003 } else if (notification_type == kSyncedNotificationAppInfoType) { | |
1004 *model_type = SYNCED_NOTIFICATION_APP_INFO; | |
1005 return true; | |
979 } else if (notification_type == kDeviceInfoNotificationType) { | 1006 } else if (notification_type == kDeviceInfoNotificationType) { |
980 *model_type = DEVICE_INFO; | 1007 *model_type = DEVICE_INFO; |
981 return true; | 1008 return true; |
982 } else if (notification_type == kExperimentsNotificationType) { | 1009 } else if (notification_type == kExperimentsNotificationType) { |
983 *model_type = EXPERIMENTS; | 1010 *model_type = EXPERIMENTS; |
984 return true; | 1011 return true; |
985 } else if (notification_type == kPriorityPreferenceNotificationType) { | 1012 } else if (notification_type == kPriorityPreferenceNotificationType) { |
986 *model_type = PRIORITY_PREFERENCES; | 1013 *model_type = PRIORITY_PREFERENCES; |
987 return true; | 1014 return true; |
988 } else if (notification_type == kDictionaryNotificationType) { | 1015 } else if (notification_type == kDictionaryNotificationType) { |
(...skipping 24 matching lines...) Expand all Loading... | |
1013 | 1040 |
1014 bool IsRealDataType(ModelType model_type) { | 1041 bool IsRealDataType(ModelType model_type) { |
1015 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT; | 1042 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT; |
1016 } | 1043 } |
1017 | 1044 |
1018 bool IsActOnceDataType(ModelType model_type) { | 1045 bool IsActOnceDataType(ModelType model_type) { |
1019 return model_type == HISTORY_DELETE_DIRECTIVES; | 1046 return model_type == HISTORY_DELETE_DIRECTIVES; |
1020 } | 1047 } |
1021 | 1048 |
1022 } // namespace syncer | 1049 } // namespace syncer |
OLD | NEW |