| 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 "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 574 } |
| 575 | 575 |
| 576 DictionaryValue* GetUpdatesMessageToValue( | 576 DictionaryValue* GetUpdatesMessageToValue( |
| 577 const sync_pb::GetUpdatesMessage& proto) { | 577 const sync_pb::GetUpdatesMessage& proto) { |
| 578 DictionaryValue* value = new DictionaryValue(); | 578 DictionaryValue* value = new DictionaryValue(); |
| 579 SET(caller_info, GetUpdatesCallerInfoToValue); | 579 SET(caller_info, GetUpdatesCallerInfoToValue); |
| 580 SET_BOOL(fetch_folders); | 580 SET_BOOL(fetch_folders); |
| 581 SET_INT32(batch_size); | 581 SET_INT32(batch_size); |
| 582 SET_REP(from_progress_marker, DataTypeProgressMarkerToValue); | 582 SET_REP(from_progress_marker, DataTypeProgressMarkerToValue); |
| 583 SET_BOOL(streaming); | 583 SET_BOOL(streaming); |
| 584 SET_BOOL(need_encryption_key); |
| 584 SET_BOOL(create_mobile_bookmarks_folder); | 585 SET_BOOL(create_mobile_bookmarks_folder); |
| 585 return value; | 586 return value; |
| 586 } | 587 } |
| 587 | 588 |
| 588 DictionaryValue* ClientStatusToValue( | 589 DictionaryValue* ClientStatusToValue( |
| 589 const sync_pb::ClientStatus& proto) { | 590 const sync_pb::ClientStatus& proto) { |
| 590 DictionaryValue* value = new DictionaryValue(); | 591 DictionaryValue* value = new DictionaryValue(); |
| 591 SET_BOOL(hierarchy_conflict_detected); | 592 SET_BOOL(hierarchy_conflict_detected); |
| 592 return value; | 593 return value; |
| 593 } | 594 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 SET_INT32(num_updates_downloaded); | 732 SET_INT32(num_updates_downloaded); |
| 732 SET_INT32(num_reflected_updates_downloaded); | 733 SET_INT32(num_reflected_updates_downloaded); |
| 733 SET(caller_info, GetUpdatesCallerInfoToValue); | 734 SET(caller_info, GetUpdatesCallerInfoToValue); |
| 734 return value; | 735 return value; |
| 735 } | 736 } |
| 736 | 737 |
| 737 base::DictionaryValue* ClientConfigParamsToValue( | 738 base::DictionaryValue* ClientConfigParamsToValue( |
| 738 const sync_pb::ClientConfigParams& proto) { | 739 const sync_pb::ClientConfigParams& proto) { |
| 739 DictionaryValue* value = new DictionaryValue(); | 740 DictionaryValue* value = new DictionaryValue(); |
| 740 SET_INT32_REP(enabled_type_ids); | 741 SET_INT32_REP(enabled_type_ids); |
| 742 SET_BOOL(tabs_datatype_enabled); |
| 741 return value; | 743 return value; |
| 742 } | 744 } |
| 743 | 745 |
| 744 #undef SET | 746 #undef SET |
| 745 #undef SET_REP | 747 #undef SET_REP |
| 746 | 748 |
| 747 #undef SET_BOOL | 749 #undef SET_BOOL |
| 748 #undef SET_BYTES | 750 #undef SET_BYTES |
| 749 #undef SET_INT32 | 751 #undef SET_INT32 |
| 750 #undef SET_INT64 | 752 #undef SET_INT64 |
| 751 #undef SET_INT64_REP | 753 #undef SET_INT64_REP |
| 752 #undef SET_STR | 754 #undef SET_STR |
| 753 #undef SET_STR_REP | 755 #undef SET_STR_REP |
| 754 | 756 |
| 755 #undef SET_FIELD | 757 #undef SET_FIELD |
| 756 | 758 |
| 757 } // namespace syncer | 759 } // namespace syncer |
| OLD | NEW |