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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 SET_STR(key_name); | 97 SET_STR(key_name); |
98 // TODO(akalin): Shouldn't blob be of type bytes instead of string? | 98 // TODO(akalin): Shouldn't blob be of type bytes instead of string? |
99 SET_BYTES(blob); | 99 SET_BYTES(blob); |
100 return value; | 100 return value; |
101 } | 101 } |
102 | 102 |
103 DictionaryValue* SessionHeaderToValue( | 103 DictionaryValue* SessionHeaderToValue( |
104 const sync_pb::SessionHeader& proto) { | 104 const sync_pb::SessionHeader& proto) { |
105 DictionaryValue* value = new DictionaryValue(); | 105 DictionaryValue* value = new DictionaryValue(); |
106 SET_REP(window, SessionWindowToValue); | 106 SET_REP(window, SessionWindowToValue); |
| 107 SET_STR(client_name); |
| 108 SET_ENUM(device_type, GetDeviceTypeString); |
107 return value; | 109 return value; |
108 } | 110 } |
109 | 111 |
110 DictionaryValue* SessionTabToValue( | 112 DictionaryValue* SessionTabToValue( |
111 const sync_pb::SessionTab& proto) { | 113 const sync_pb::SessionTab& proto) { |
112 DictionaryValue* value = new DictionaryValue(); | 114 DictionaryValue* value = new DictionaryValue(); |
113 SET_INT32(tab_id); | 115 SET_INT32(tab_id); |
114 SET_INT32(window_id); | 116 SET_INT32(window_id); |
115 SET_INT32(tab_visual_index); | 117 SET_INT32(tab_visual_index); |
116 SET_INT32(current_navigation_index); | 118 SET_INT32(current_navigation_index); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 #undef SET_BOOL | 337 #undef SET_BOOL |
336 #undef SET_BYTES | 338 #undef SET_BYTES |
337 #undef SET_INT32 | 339 #undef SET_INT32 |
338 #undef SET_INT64 | 340 #undef SET_INT64 |
339 #undef SET_INT64_REP | 341 #undef SET_INT64_REP |
340 #undef SET_STR | 342 #undef SET_STR |
341 | 343 |
342 #undef SET_EXTENSION | 344 #undef SET_EXTENSION |
343 | 345 |
344 } // namespace browser_sync | 346 } // namespace browser_sync |
OLD | NEW |