Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: sync/protocol/proto_value_conversions.cc

Issue 76333002: Add Sync datatype for shared managed user settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 base::DictionaryValue* value = new base::DictionaryValue(); 539 base::DictionaryValue* value = new base::DictionaryValue();
540 SET_STR(id); 540 SET_STR(id);
541 SET_STR(name); 541 SET_STR(name);
542 SET_BOOL(acknowledged); 542 SET_BOOL(acknowledged);
543 SET_STR(master_key); 543 SET_STR(master_key);
544 SET_STR(chrome_avatar); 544 SET_STR(chrome_avatar);
545 SET_STR(chromeos_avatar); 545 SET_STR(chromeos_avatar);
546 return value; 546 return value;
547 } 547 }
548 548
549 base::DictionaryValue* ManagedUserSharedSettingSpecificsToValue(
550 const sync_pb::ManagedUserSharedSettingSpecifics& proto) {
551 base::DictionaryValue* value = new base::DictionaryValue();
552 SET_STR(mu_id);
553 SET_STR(key);
554 SET_STR(value);
555 return value;
556 }
557
549 base::DictionaryValue* NigoriSpecificsToValue( 558 base::DictionaryValue* NigoriSpecificsToValue(
550 const sync_pb::NigoriSpecifics& proto) { 559 const sync_pb::NigoriSpecifics& proto) {
551 base::DictionaryValue* value = new base::DictionaryValue(); 560 base::DictionaryValue* value = new base::DictionaryValue();
552 SET(encryption_keybag, EncryptedDataToValue); 561 SET(encryption_keybag, EncryptedDataToValue);
553 SET_BOOL(keybag_is_frozen); 562 SET_BOOL(keybag_is_frozen);
554 SET_BOOL(encrypt_bookmarks); 563 SET_BOOL(encrypt_bookmarks);
555 SET_BOOL(encrypt_preferences); 564 SET_BOOL(encrypt_preferences);
556 SET_BOOL(encrypt_autofill_profile); 565 SET_BOOL(encrypt_autofill_profile);
557 SET_BOOL(encrypt_autofill); 566 SET_BOOL(encrypt_autofill);
558 SET_BOOL(encrypt_themes); 567 SET_BOOL(encrypt_themes);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 SET_FIELD(bookmark, BookmarkSpecificsToValue); 704 SET_FIELD(bookmark, BookmarkSpecificsToValue);
696 SET_FIELD(device_info, DeviceInfoSpecificsToValue); 705 SET_FIELD(device_info, DeviceInfoSpecificsToValue);
697 SET_FIELD(dictionary, DictionarySpecificsToValue); 706 SET_FIELD(dictionary, DictionarySpecificsToValue);
698 SET_FIELD(experiments, ExperimentsSpecificsToValue); 707 SET_FIELD(experiments, ExperimentsSpecificsToValue);
699 SET_FIELD(extension, ExtensionSpecificsToValue); 708 SET_FIELD(extension, ExtensionSpecificsToValue);
700 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); 709 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue);
701 SET_FIELD(favicon_image, FaviconImageSpecificsToValue); 710 SET_FIELD(favicon_image, FaviconImageSpecificsToValue);
702 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue); 711 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue);
703 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue); 712 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue);
704 SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue); 713 SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue);
714 SET_FIELD(managed_user_shared_setting,
715 ManagedUserSharedSettingSpecificsToValue);
705 SET_FIELD(managed_user, ManagedUserSpecificsToValue); 716 SET_FIELD(managed_user, ManagedUserSpecificsToValue);
706 SET_FIELD(nigori, NigoriSpecificsToValue); 717 SET_FIELD(nigori, NigoriSpecificsToValue);
707 SET_FIELD(password, PasswordSpecificsToValue); 718 SET_FIELD(password, PasswordSpecificsToValue);
708 SET_FIELD(preference, PreferenceSpecificsToValue); 719 SET_FIELD(preference, PreferenceSpecificsToValue);
709 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue); 720 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue);
710 SET_FIELD(search_engine, SearchEngineSpecificsToValue); 721 SET_FIELD(search_engine, SearchEngineSpecificsToValue);
711 SET_FIELD(session, SessionSpecificsToValue); 722 SET_FIELD(session, SessionSpecificsToValue);
712 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue); 723 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue);
713 SET_FIELD(theme, ThemeSpecificsToValue); 724 SET_FIELD(theme, ThemeSpecificsToValue);
714 SET_FIELD(typed_url, TypedUrlSpecificsToValue); 725 SET_FIELD(typed_url, TypedUrlSpecificsToValue);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 #undef SET_BYTES 1007 #undef SET_BYTES
997 #undef SET_INT32 1008 #undef SET_INT32
998 #undef SET_INT64 1009 #undef SET_INT64
999 #undef SET_INT64_REP 1010 #undef SET_INT64_REP
1000 #undef SET_STR 1011 #undef SET_STR
1001 #undef SET_STR_REP 1012 #undef SET_STR_REP
1002 1013
1003 #undef SET_FIELD 1014 #undef SET_FIELD
1004 1015
1005 } // namespace syncer 1016 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698