Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 SET_STR(username_value); | 179 SET_STR(username_value); |
| 180 SET_STR(password_element); | 180 SET_STR(password_element); |
| 181 value->SetString("password_value", "<redacted>"); | 181 value->SetString("password_value", "<redacted>"); |
| 182 SET_BOOL(ssl_valid); | 182 SET_BOOL(ssl_valid); |
| 183 SET_BOOL(preferred); | 183 SET_BOOL(preferred); |
| 184 SET_INT64(date_created); | 184 SET_INT64(date_created); |
| 185 SET_BOOL(blacklisted); | 185 SET_BOOL(blacklisted); |
| 186 return value; | 186 return value; |
| 187 } | 187 } |
| 188 | 188 |
| 189 DictionaryValue* DeviceInformationToValue( | 189 DictionaryValue* DeviceInfoSpecificsToValue( |
| 190 const sync_pb::DeviceInformation& proto) { | 190 const sync_pb::DeviceInfoSpecifics& proto) { |
| 191 DictionaryValue* value = new DictionaryValue(); | 191 DictionaryValue* value = new DictionaryValue(); |
| 192 SET_STR(cache_guid); | 192 SET_STR(cache_guid); |
| 193 SET_STR(name); | 193 SET_STR(name); |
| 194 SET_STR(platform); | 194 SET_STR(platform); |
| 195 SET_STR(chrome_version); | 195 SET_STR(chrome_version); |
| 196 return value; | 196 return value; |
| 197 } | 197 } |
| 198 | 198 |
| 199 DictionaryValue* AppNotificationToValue( | 199 DictionaryValue* AppNotificationToValue( |
| 200 const sync_pb::AppNotification& proto) { | 200 const sync_pb::AppNotification& proto) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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); | |
| 312 SET_BOOL(sync_tab_favicons); | 311 SET_BOOL(sync_tab_favicons); |
| 313 return value; | 312 return value; |
| 314 } | 313 } |
| 315 | 314 |
| 316 DictionaryValue* PasswordSpecificsToValue( | 315 DictionaryValue* PasswordSpecificsToValue( |
| 317 const sync_pb::PasswordSpecifics& proto) { | 316 const sync_pb::PasswordSpecifics& proto) { |
| 318 DictionaryValue* value = new DictionaryValue(); | 317 DictionaryValue* value = new DictionaryValue(); |
| 319 SET(encrypted, EncryptedDataToValue); | 318 SET(encrypted, EncryptedDataToValue); |
| 320 return value; | 319 return value; |
| 321 } | 320 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 SET_FIELD(app, AppSpecificsToValue); | 386 SET_FIELD(app, AppSpecificsToValue); |
| 388 SET_FIELD(app_notification, AppNotificationToValue); | 387 SET_FIELD(app_notification, AppNotificationToValue); |
| 389 SET_FIELD(app_setting, AppSettingSpecificsToValue); | 388 SET_FIELD(app_setting, AppSettingSpecificsToValue); |
| 390 SET_FIELD(autofill, AutofillSpecificsToValue); | 389 SET_FIELD(autofill, AutofillSpecificsToValue); |
| 391 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue); | 390 SET_FIELD(autofill_profile, AutofillProfileSpecificsToValue); |
| 392 SET_FIELD(bookmark, BookmarkSpecificsToValue); | 391 SET_FIELD(bookmark, BookmarkSpecificsToValue); |
| 393 SET_FIELD(extension, ExtensionSpecificsToValue); | 392 SET_FIELD(extension, ExtensionSpecificsToValue); |
| 394 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); | 393 SET_FIELD(extension_setting, ExtensionSettingSpecificsToValue); |
| 395 SET_FIELD(nigori, NigoriSpecificsToValue); | 394 SET_FIELD(nigori, NigoriSpecificsToValue); |
| 396 SET_FIELD(password, PasswordSpecificsToValue); | 395 SET_FIELD(password, PasswordSpecificsToValue); |
| 396 SET_FIELD(device_info, DeviceInfoSpecificsToValue); | |
|
Nicolas Zea
2012/09/13 00:45:55
abc
rlarocque
2012/09/14 01:03:07
Done.
| |
| 397 SET_FIELD(preference, PreferenceSpecificsToValue); | 397 SET_FIELD(preference, PreferenceSpecificsToValue); |
| 398 SET_FIELD(search_engine, SearchEngineSpecificsToValue); | 398 SET_FIELD(search_engine, SearchEngineSpecificsToValue); |
| 399 SET_FIELD(session, SessionSpecificsToValue); | 399 SET_FIELD(session, SessionSpecificsToValue); |
| 400 SET_FIELD(theme, ThemeSpecificsToValue); | 400 SET_FIELD(theme, ThemeSpecificsToValue); |
| 401 SET_FIELD(typed_url, TypedUrlSpecificsToValue); | 401 SET_FIELD(typed_url, TypedUrlSpecificsToValue); |
| 402 return value; | 402 return value; |
| 403 } | 403 } |
| 404 | 404 |
| 405 namespace { | 405 namespace { |
| 406 | 406 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 587 #undef SET_BYTES | 587 #undef SET_BYTES |
| 588 #undef SET_INT32 | 588 #undef SET_INT32 |
| 589 #undef SET_INT64 | 589 #undef SET_INT64 |
| 590 #undef SET_INT64_REP | 590 #undef SET_INT64_REP |
| 591 #undef SET_STR | 591 #undef SET_STR |
| 592 #undef SET_STR_REP | 592 #undef SET_STR_REP |
| 593 | 593 |
| 594 #undef SET_FIELD | 594 #undef SET_FIELD |
| 595 | 595 |
| 596 } // namespace syncer | 596 } // namespace syncer |
| OLD | NEW |