| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 SET_STR(update_url); | 286 SET_STR(update_url); |
| 287 SET_BOOL(enabled); | 287 SET_BOOL(enabled); |
| 288 SET_BOOL(incognito_enabled); | 288 SET_BOOL(incognito_enabled); |
| 289 SET_STR(name); | 289 SET_STR(name); |
| 290 return value; | 290 return value; |
| 291 } | 291 } |
| 292 | 292 |
| 293 DictionaryValue* NigoriSpecificsToValue( | 293 DictionaryValue* NigoriSpecificsToValue( |
| 294 const sync_pb::NigoriSpecifics& proto) { | 294 const sync_pb::NigoriSpecifics& proto) { |
| 295 DictionaryValue* value = new DictionaryValue(); | 295 DictionaryValue* value = new DictionaryValue(); |
| 296 SET(encrypted, EncryptedDataToValue); | 296 SET(encryption_keybag, EncryptedDataToValue); |
| 297 SET_BOOL(using_explicit_passphrase); | 297 SET_BOOL(keybag_is_frozen); |
| 298 SET_BOOL(encrypt_bookmarks); | 298 SET_BOOL(encrypt_bookmarks); |
| 299 SET_BOOL(encrypt_preferences); | 299 SET_BOOL(encrypt_preferences); |
| 300 SET_BOOL(encrypt_autofill_profile); | 300 SET_BOOL(encrypt_autofill_profile); |
| 301 SET_BOOL(encrypt_autofill); | 301 SET_BOOL(encrypt_autofill); |
| 302 SET_BOOL(encrypt_themes); | 302 SET_BOOL(encrypt_themes); |
| 303 SET_BOOL(encrypt_typed_urls); | 303 SET_BOOL(encrypt_typed_urls); |
| 304 SET_BOOL(encrypt_extension_settings); | 304 SET_BOOL(encrypt_extension_settings); |
| 305 SET_BOOL(encrypt_extensions); | 305 SET_BOOL(encrypt_extensions); |
| 306 SET_BOOL(encrypt_sessions); | 306 SET_BOOL(encrypt_sessions); |
| 307 SET_BOOL(encrypt_app_settings); | 307 SET_BOOL(encrypt_app_settings); |
| 308 SET_BOOL(encrypt_apps); | 308 SET_BOOL(encrypt_apps); |
| 309 SET_BOOL(encrypt_search_engines); | 309 SET_BOOL(encrypt_search_engines); |
| 310 SET_BOOL(encrypt_everything); | 310 SET_BOOL(encrypt_everything); |
| 311 SET_REP(device_information, DeviceInformationToValue); | 311 SET_REP(device_information, DeviceInformationToValue); |
| 312 SET_BOOL(sync_tab_favicons); | 312 SET_BOOL(sync_tab_favicons); |
| 313 SET_ENUM(passphrase_type, PassphraseTypeString); |
| 314 SET(keystore_decryptor_token, EncryptedDataToValue); |
| 315 SET_INT64(keystore_migration_time); |
| 313 return value; | 316 return value; |
| 314 } | 317 } |
| 315 | 318 |
| 316 DictionaryValue* PasswordSpecificsToValue( | 319 DictionaryValue* PasswordSpecificsToValue( |
| 317 const sync_pb::PasswordSpecifics& proto) { | 320 const sync_pb::PasswordSpecifics& proto) { |
| 318 DictionaryValue* value = new DictionaryValue(); | 321 DictionaryValue* value = new DictionaryValue(); |
| 319 SET(encrypted, EncryptedDataToValue); | 322 SET(encrypted, EncryptedDataToValue); |
| 320 return value; | 323 return value; |
| 321 } | 324 } |
| 322 | 325 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 value->Set("commit", | 575 value->Set("commit", |
| 573 CommitMessageToValue(proto.commit(), include_specifics)); | 576 CommitMessageToValue(proto.commit(), include_specifics)); |
| 574 } | 577 } |
| 575 | 578 |
| 576 SET(get_updates, GetUpdatesMessageToValue); | 579 SET(get_updates, GetUpdatesMessageToValue); |
| 577 SET_STR(store_birthday); | 580 SET_STR(store_birthday); |
| 578 SET_BOOL(sync_problem_detected); | 581 SET_BOOL(sync_problem_detected); |
| 579 return value; | 582 return value; |
| 580 } | 583 } |
| 581 | 584 |
| 582 | |
| 583 #undef SET | 585 #undef SET |
| 584 #undef SET_REP | 586 #undef SET_REP |
| 585 | 587 |
| 586 #undef SET_BOOL | 588 #undef SET_BOOL |
| 587 #undef SET_BYTES | 589 #undef SET_BYTES |
| 588 #undef SET_INT32 | 590 #undef SET_INT32 |
| 589 #undef SET_INT64 | 591 #undef SET_INT64 |
| 590 #undef SET_INT64_REP | 592 #undef SET_INT64_REP |
| 591 #undef SET_STR | 593 #undef SET_STR |
| 592 #undef SET_STR_REP | 594 #undef SET_STR_REP |
| 593 | 595 |
| 594 #undef SET_FIELD | 596 #undef SET_FIELD |
| 595 | 597 |
| 596 } // namespace syncer | 598 } // namespace syncer |
| OLD | NEW |