| 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 "components/sync/base/model_type.h" | 5 #include "components/sync/base/model_type.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 ModelTypeSet PriorityCoreTypes() { | 533 ModelTypeSet PriorityCoreTypes() { |
| 534 ModelTypeSet result = ControlTypes(); | 534 ModelTypeSet result = ControlTypes(); |
| 535 | 535 |
| 536 // The following are non-control core types. | 536 // The following are non-control core types. |
| 537 result.Put(SUPERVISED_USERS); | 537 result.Put(SUPERVISED_USERS); |
| 538 result.Put(SUPERVISED_USER_SETTINGS); | 538 result.Put(SUPERVISED_USER_SETTINGS); |
| 539 | 539 |
| 540 return result; | 540 return result; |
| 541 } | 541 } |
| 542 | 542 |
| 543 ModelTypeSet CommitOnlyTypes() { |
| 544 return ModelTypeSet(USER_EVENTS); |
| 545 } |
| 546 |
| 543 const char* ModelTypeToString(ModelType model_type) { | 547 const char* ModelTypeToString(ModelType model_type) { |
| 544 // This is used in serialization routines as well as for displaying debug | 548 // This is used in serialization routines as well as for displaying debug |
| 545 // information. Do not attempt to change these string values unless you know | 549 // information. Do not attempt to change these string values unless you know |
| 546 // what you're doing. | 550 // what you're doing. |
| 547 if (model_type >= UNSPECIFIED && model_type < MODEL_TYPE_COUNT) | 551 if (model_type >= UNSPECIFIED && model_type < MODEL_TYPE_COUNT) |
| 548 return kModelTypeInfoMap[model_type].model_type_string; | 552 return kModelTypeInfoMap[model_type].model_type_string; |
| 549 NOTREACHED() << "No known extension for model type."; | 553 NOTREACHED() << "No known extension for model type."; |
| 550 return "Invalid"; | 554 return "Invalid"; |
| 551 } | 555 } |
| 552 | 556 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 bool TypeSupportsHierarchy(ModelType model_type) { | 729 bool TypeSupportsHierarchy(ModelType model_type) { |
| 726 // TODO(stanisc): crbug/438313: Should this also include TOP_LEVEL_FOLDER? | 730 // TODO(stanisc): crbug/438313: Should this also include TOP_LEVEL_FOLDER? |
| 727 return model_type == BOOKMARKS; | 731 return model_type == BOOKMARKS; |
| 728 } | 732 } |
| 729 | 733 |
| 730 bool TypeSupportsOrdering(ModelType model_type) { | 734 bool TypeSupportsOrdering(ModelType model_type) { |
| 731 return model_type == BOOKMARKS; | 735 return model_type == BOOKMARKS; |
| 732 } | 736 } |
| 733 | 737 |
| 734 } // namespace syncer | 738 } // namespace syncer |
| OLD | NEW |