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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
6 | 6 |
7 #include "sync/protocol/proto_value_conversions.h" | 7 #include "sync/protocol/proto_value_conversions.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 namespace { | 501 namespace { |
502 | 502 |
503 base::DictionaryValue* FaviconSyncFlagsToValue( | 503 base::DictionaryValue* FaviconSyncFlagsToValue( |
504 const sync_pb::FaviconSyncFlags& proto) { | 504 const sync_pb::FaviconSyncFlags& proto) { |
505 base::DictionaryValue* value = new base::DictionaryValue(); | 505 base::DictionaryValue* value = new base::DictionaryValue(); |
506 SET_BOOL(enabled); | 506 SET_BOOL(enabled); |
507 SET_INT32(favicon_sync_limit); | 507 SET_INT32(favicon_sync_limit); |
508 return value; | 508 return value; |
509 } | 509 } |
510 | 510 |
| 511 base::DictionaryValue* EnhancedBookmarksFlagsToValue( |
| 512 const sync_pb::EnhancedBookmarksFlags& proto) { |
| 513 base::DictionaryValue* value = new base::DictionaryValue(); |
| 514 SET_BOOL(enabled); |
| 515 SET_STR(extension_id); |
| 516 return value; |
| 517 } |
| 518 |
511 } // namespace | 519 } // namespace |
512 | 520 |
513 base::DictionaryValue* ExperimentsSpecificsToValue( | 521 base::DictionaryValue* ExperimentsSpecificsToValue( |
514 const sync_pb::ExperimentsSpecifics& proto) { | 522 const sync_pb::ExperimentsSpecifics& proto) { |
515 base::DictionaryValue* value = new base::DictionaryValue(); | 523 base::DictionaryValue* value = new base::DictionaryValue(); |
516 SET_EXPERIMENT_ENABLED_FIELD(keystore_encryption); | 524 SET_EXPERIMENT_ENABLED_FIELD(keystore_encryption); |
517 SET_EXPERIMENT_ENABLED_FIELD(history_delete_directives); | 525 SET_EXPERIMENT_ENABLED_FIELD(history_delete_directives); |
518 SET_EXPERIMENT_ENABLED_FIELD(autofill_culling); | 526 SET_EXPERIMENT_ENABLED_FIELD(autofill_culling); |
519 SET_EXPERIMENT_ENABLED_FIELD(pre_commit_update_avoidance); | 527 SET_EXPERIMENT_ENABLED_FIELD(pre_commit_update_avoidance); |
520 SET(favicon_sync, FaviconSyncFlagsToValue); | 528 SET(favicon_sync, FaviconSyncFlagsToValue); |
521 SET_EXPERIMENT_ENABLED_FIELD(gcm_channel); | 529 SET_EXPERIMENT_ENABLED_FIELD(gcm_channel); |
522 SET_EXPERIMENT_ENABLED_FIELD(enhanced_bookmarks); | 530 SET(enhanced_bookmarks, EnhancedBookmarksFlagsToValue); |
523 SET_EXPERIMENT_ENABLED_FIELD(gcm_invalidations); | 531 SET_EXPERIMENT_ENABLED_FIELD(gcm_invalidations); |
524 return value; | 532 return value; |
525 } | 533 } |
526 | 534 |
527 base::DictionaryValue* ExtensionSettingSpecificsToValue( | 535 base::DictionaryValue* ExtensionSettingSpecificsToValue( |
528 const sync_pb::ExtensionSettingSpecifics& proto) { | 536 const sync_pb::ExtensionSettingSpecifics& proto) { |
529 base::DictionaryValue* value = new base::DictionaryValue(); | 537 base::DictionaryValue* value = new base::DictionaryValue(); |
530 SET_STR(extension_id); | 538 SET_STR(extension_id); |
531 SET_STR(key); | 539 SET_STR(key); |
532 SET_STR(value); | 540 SET_STR(value); |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 #undef SET_BYTES | 1103 #undef SET_BYTES |
1096 #undef SET_INT32 | 1104 #undef SET_INT32 |
1097 #undef SET_INT64 | 1105 #undef SET_INT64 |
1098 #undef SET_INT64_REP | 1106 #undef SET_INT64_REP |
1099 #undef SET_STR | 1107 #undef SET_STR |
1100 #undef SET_STR_REP | 1108 #undef SET_STR_REP |
1101 | 1109 |
1102 #undef SET_FIELD | 1110 #undef SET_FIELD |
1103 | 1111 |
1104 } // namespace syncer | 1112 } // namespace syncer |
OLD | NEW |