| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/protocol/proto_value_conversions.h" | 7 #include "chrome/browser/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // TODO(akalin): Shouldn't blob be of type bytes instead of string? | 101 // TODO(akalin): Shouldn't blob be of type bytes instead of string? |
| 102 SET_BYTES(blob); | 102 SET_BYTES(blob); |
| 103 return value; | 103 return value; |
| 104 } | 104 } |
| 105 | 105 |
| 106 DictionaryValue* AppSettingsToValue( | 106 DictionaryValue* AppSettingsToValue( |
| 107 const sync_pb::AppNotificationSettings& proto) { | 107 const sync_pb::AppNotificationSettings& proto) { |
| 108 DictionaryValue* value = new DictionaryValue(); | 108 DictionaryValue* value = new DictionaryValue(); |
| 109 SET_BOOL(initial_setup_done); | 109 SET_BOOL(initial_setup_done); |
| 110 SET_BOOL(disabled); | 110 SET_BOOL(disabled); |
| 111 SET_STR(oauth_client_id); |
| 111 return value; | 112 return value; |
| 112 } | 113 } |
| 113 | 114 |
| 114 DictionaryValue* SessionHeaderToValue( | 115 DictionaryValue* SessionHeaderToValue( |
| 115 const sync_pb::SessionHeader& proto) { | 116 const sync_pb::SessionHeader& proto) { |
| 116 DictionaryValue* value = new DictionaryValue(); | 117 DictionaryValue* value = new DictionaryValue(); |
| 117 SET_REP(window, SessionWindowToValue); | 118 SET_REP(window, SessionWindowToValue); |
| 118 SET_STR(client_name); | 119 SET_STR(client_name); |
| 119 SET_ENUM(device_type, GetDeviceTypeString); | 120 SET_ENUM(device_type, GetDeviceTypeString); |
| 120 return value; | 121 return value; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 #undef SET_BOOL | 383 #undef SET_BOOL |
| 383 #undef SET_BYTES | 384 #undef SET_BYTES |
| 384 #undef SET_INT32 | 385 #undef SET_INT32 |
| 385 #undef SET_INT64 | 386 #undef SET_INT64 |
| 386 #undef SET_INT64_REP | 387 #undef SET_INT64_REP |
| 387 #undef SET_STR | 388 #undef SET_STR |
| 388 | 389 |
| 389 #undef SET_EXTENSION | 390 #undef SET_EXTENSION |
| 390 | 391 |
| 391 } // namespace browser_sync | 392 } // namespace browser_sync |
| OLD | NEW |