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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 416 } |
417 | 417 |
418 base::DictionaryValue* ManagedUserSettingSpecificsToValue( | 418 base::DictionaryValue* ManagedUserSettingSpecificsToValue( |
419 const sync_pb::ManagedUserSettingSpecifics& proto) { | 419 const sync_pb::ManagedUserSettingSpecifics& proto) { |
420 base::DictionaryValue* value = new base::DictionaryValue(); | 420 base::DictionaryValue* value = new base::DictionaryValue(); |
421 SET_STR(name); | 421 SET_STR(name); |
422 SET_STR(value); | 422 SET_STR(value); |
423 return value; | 423 return value; |
424 } | 424 } |
425 | 425 |
| 426 base::DictionaryValue* ManagedUserSpecificsToValue( |
| 427 const sync_pb::ManagedUserSpecifics& proto) { |
| 428 base::DictionaryValue* value = new base::DictionaryValue(); |
| 429 SET_STR(id); |
| 430 SET_STR(name); |
| 431 SET_BOOL(acknowledged); |
| 432 return value; |
| 433 } |
| 434 |
426 base::DictionaryValue* NigoriSpecificsToValue( | 435 base::DictionaryValue* NigoriSpecificsToValue( |
427 const sync_pb::NigoriSpecifics& proto) { | 436 const sync_pb::NigoriSpecifics& proto) { |
428 base::DictionaryValue* value = new base::DictionaryValue(); | 437 base::DictionaryValue* value = new base::DictionaryValue(); |
429 SET(encryption_keybag, EncryptedDataToValue); | 438 SET(encryption_keybag, EncryptedDataToValue); |
430 SET_BOOL(keybag_is_frozen); | 439 SET_BOOL(keybag_is_frozen); |
431 SET_BOOL(encrypt_bookmarks); | 440 SET_BOOL(encrypt_bookmarks); |
432 SET_BOOL(encrypt_preferences); | 441 SET_BOOL(encrypt_preferences); |
433 SET_BOOL(encrypt_autofill_profile); | 442 SET_BOOL(encrypt_autofill_profile); |
434 SET_BOOL(encrypt_autofill); | 443 SET_BOOL(encrypt_autofill); |
435 SET_BOOL(encrypt_themes); | 444 SET_BOOL(encrypt_themes); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 SET_FIELD(bookmark, BookmarkSpecificsToValue); | 554 SET_FIELD(bookmark, BookmarkSpecificsToValue); |
546 SET_FIELD(device_info, DeviceInfoSpecificsToValue); | 555 SET_FIELD(device_info, DeviceInfoSpecificsToValue); |
547 SET_FIELD(dictionary, DictionarySpecificsToValue); | 556 SET_FIELD(dictionary, DictionarySpecificsToValue); |
548 SET_FIELD(experiments, ExperimentsSpecificsToValue); | 557 SET_FIELD(experiments, ExperimentsSpecificsToValue); |
549 SET_FIELD(extension, ExtensionSpecificsToValue); | 558 SET_FIELD(extension, ExtensionSpecificsToValue); |
550 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); | 559 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); |
551 SET_FIELD(favicon_image, FaviconImageSpecificsToValue); | 560 SET_FIELD(favicon_image, FaviconImageSpecificsToValue); |
552 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue); | 561 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue); |
553 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue); | 562 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue); |
554 SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue); | 563 SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue); |
| 564 SET_FIELD(managed_user, ManagedUserSpecificsToValue); |
555 SET_FIELD(nigori, NigoriSpecificsToValue); | 565 SET_FIELD(nigori, NigoriSpecificsToValue); |
556 SET_FIELD(password, PasswordSpecificsToValue); | 566 SET_FIELD(password, PasswordSpecificsToValue); |
557 SET_FIELD(preference, PreferenceSpecificsToValue); | 567 SET_FIELD(preference, PreferenceSpecificsToValue); |
558 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue); | 568 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue); |
559 SET_FIELD(search_engine, SearchEngineSpecificsToValue); | 569 SET_FIELD(search_engine, SearchEngineSpecificsToValue); |
560 SET_FIELD(session, SessionSpecificsToValue); | 570 SET_FIELD(session, SessionSpecificsToValue); |
561 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue); | 571 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue); |
562 SET_FIELD(theme, ThemeSpecificsToValue); | 572 SET_FIELD(theme, ThemeSpecificsToValue); |
563 SET_FIELD(typed_url, TypedUrlSpecificsToValue); | 573 SET_FIELD(typed_url, TypedUrlSpecificsToValue); |
564 return value; | 574 return value; |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 #undef SET_BYTES | 849 #undef SET_BYTES |
840 #undef SET_INT32 | 850 #undef SET_INT32 |
841 #undef SET_INT64 | 851 #undef SET_INT64 |
842 #undef SET_INT64_REP | 852 #undef SET_INT64_REP |
843 #undef SET_STR | 853 #undef SET_STR |
844 #undef SET_STR_REP | 854 #undef SET_STR_REP |
845 | 855 |
846 #undef SET_FIELD | 856 #undef SET_FIELD |
847 | 857 |
848 } // namespace syncer | 858 } // namespace syncer |
OLD | NEW |