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

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

Issue 14053004: Add ManagedUserSettings Sync data type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 months 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 "base/base64.h" 9 #include "base/base64.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 base::DictionaryValue* HistoryDeleteDirectiveSpecificsToValue( 397 base::DictionaryValue* HistoryDeleteDirectiveSpecificsToValue(
398 const sync_pb::HistoryDeleteDirectiveSpecifics& proto) { 398 const sync_pb::HistoryDeleteDirectiveSpecifics& proto) {
399 base::DictionaryValue* value = new base::DictionaryValue(); 399 base::DictionaryValue* value = new base::DictionaryValue();
400 SET(global_id_directive, GlobalIdDirectiveToValue); 400 SET(global_id_directive, GlobalIdDirectiveToValue);
401 SET(time_range_directive, TimeRangeDirectiveToValue); 401 SET(time_range_directive, TimeRangeDirectiveToValue);
402 return value; 402 return value;
403 } 403 }
404 404
405 base::DictionaryValue* ManagedUserSettingSpecificsToValue(
406 const sync_pb::ManagedUserSettingSpecifics& proto) {
407 base::DictionaryValue* value = new base::DictionaryValue();
408 SET_STR(name);
409 SET_STR(value);
410 return value;
411 }
412
405 base::DictionaryValue* NigoriSpecificsToValue( 413 base::DictionaryValue* NigoriSpecificsToValue(
406 const sync_pb::NigoriSpecifics& proto) { 414 const sync_pb::NigoriSpecifics& proto) {
407 base::DictionaryValue* value = new base::DictionaryValue(); 415 base::DictionaryValue* value = new base::DictionaryValue();
408 SET(encryption_keybag, EncryptedDataToValue); 416 SET(encryption_keybag, EncryptedDataToValue);
409 SET_BOOL(keybag_is_frozen); 417 SET_BOOL(keybag_is_frozen);
410 SET_BOOL(encrypt_bookmarks); 418 SET_BOOL(encrypt_bookmarks);
411 SET_BOOL(encrypt_preferences); 419 SET_BOOL(encrypt_preferences);
412 SET_BOOL(encrypt_autofill_profile); 420 SET_BOOL(encrypt_autofill_profile);
413 SET_BOOL(encrypt_autofill); 421 SET_BOOL(encrypt_autofill);
414 SET_BOOL(encrypt_themes); 422 SET_BOOL(encrypt_themes);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue); 531 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue);
524 SET_FIELD(bookmark, BookmarkSpecificsToValue); 532 SET_FIELD(bookmark, BookmarkSpecificsToValue);
525 SET_FIELD(device_info, DeviceInfoSpecificsToValue); 533 SET_FIELD(device_info, DeviceInfoSpecificsToValue);
526 SET_FIELD(dictionary, DictionarySpecificsToValue); 534 SET_FIELD(dictionary, DictionarySpecificsToValue);
527 SET_FIELD(experiments, ExperimentsSpecificsToValue); 535 SET_FIELD(experiments, ExperimentsSpecificsToValue);
528 SET_FIELD(extension, ExtensionSpecificsToValue); 536 SET_FIELD(extension, ExtensionSpecificsToValue);
529 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); 537 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue);
530 SET_FIELD(favicon_image, FaviconImageSpecificsToValue); 538 SET_FIELD(favicon_image, FaviconImageSpecificsToValue);
531 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue); 539 SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue);
532 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue); 540 SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue);
541 SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue);
533 SET_FIELD(nigori, NigoriSpecificsToValue); 542 SET_FIELD(nigori, NigoriSpecificsToValue);
534 SET_FIELD(password, PasswordSpecificsToValue); 543 SET_FIELD(password, PasswordSpecificsToValue);
535 SET_FIELD(preference, PreferenceSpecificsToValue); 544 SET_FIELD(preference, PreferenceSpecificsToValue);
536 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue); 545 SET_FIELD(priority_preference, PriorityPreferenceSpecificsToValue);
537 SET_FIELD(search_engine, SearchEngineSpecificsToValue); 546 SET_FIELD(search_engine, SearchEngineSpecificsToValue);
538 SET_FIELD(session, SessionSpecificsToValue); 547 SET_FIELD(session, SessionSpecificsToValue);
539 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue); 548 SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue);
540 SET_FIELD(theme, ThemeSpecificsToValue); 549 SET_FIELD(theme, ThemeSpecificsToValue);
541 SET_FIELD(typed_url, TypedUrlSpecificsToValue); 550 SET_FIELD(typed_url, TypedUrlSpecificsToValue);
542 return value; 551 return value;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 #undef SET_BYTES 812 #undef SET_BYTES
804 #undef SET_INT32 813 #undef SET_INT32
805 #undef SET_INT64 814 #undef SET_INT64
806 #undef SET_INT64_REP 815 #undef SET_INT64_REP
807 #undef SET_STR 816 #undef SET_STR
808 #undef SET_STR_REP 817 #undef SET_STR_REP
809 818
810 #undef SET_FIELD 819 #undef SET_FIELD
811 820
812 } // namespace syncer 821 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698