OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ | 5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ |
6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ | 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ |
7 | 7 |
8 #include "components/sync/protocol/app_list_specifics.pb.h" | 8 #include "components/sync/protocol/app_list_specifics.pb.h" |
9 #include "components/sync/protocol/app_notification_specifics.pb.h" | 9 #include "components/sync/protocol/app_notification_specifics.pb.h" |
10 #include "components/sync/protocol/app_setting_specifics.pb.h" | 10 #include "components/sync/protocol/app_setting_specifics.pb.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // We could use template magic (std::is_enum) to handle enums, but that would | 68 // We could use template magic (std::is_enum) to handle enums, but that would |
69 // complicate visitors, and besides we already have special case for 'bytes', | 69 // complicate visitors, and besides we already have special case for 'bytes', |
70 // so just add one more special case. Calls visitor.VisitEnum(). | 70 // so just add one more special case. Calls visitor.VisitEnum(). |
71 #define VISIT_ENUM(field) VISIT_(Enum, field) | 71 #define VISIT_ENUM(field) VISIT_(Enum, field) |
72 | 72 |
73 // Repeated fields are always present, so there are no 'has_<field>' methods. | 73 // Repeated fields are always present, so there are no 'has_<field>' methods. |
74 // This macro unconditionally calls visitor.Visit(). | 74 // This macro unconditionally calls visitor.Visit(). |
75 #define VISIT_REP(field) \ | 75 #define VISIT_REP(field) \ |
76 visitor.Visit(proto, #field, proto.field()); | 76 visitor.Visit(proto, #field, proto.field()); |
77 | 77 |
| 78 // NOLINT(runtime/references) is necessary to avoid a presubmit warning about |
| 79 // V& not being const. |
| 80 #define VISIT_PROTO_FIELDS(proto) \ |
| 81 template <class V> \ |
| 82 void VisitProtoFields(V& visitor, proto) // NOLINT(runtime/references) |
| 83 |
78 namespace syncer { | 84 namespace syncer { |
79 | 85 |
80 template <class V> | 86 VISIT_PROTO_FIELDS(const sync_pb::EncryptedData& proto) { |
81 void VisitProtoFields(V& visitor, const sync_pb::EncryptedData& proto) { | |
82 VISIT(key_name); | 87 VISIT(key_name); |
83 // TODO(akalin): Shouldn't blob be of type bytes instead of string? | 88 // TODO(akalin): Shouldn't blob be of type bytes instead of string? |
84 VISIT_BYTES(blob); | 89 VISIT_BYTES(blob); |
85 } | 90 } |
86 | 91 |
87 template <class V> | 92 VISIT_PROTO_FIELDS(const sync_pb::PasswordSpecificsMetadata& proto) { |
88 void VisitProtoFields(V& visitor, | |
89 const sync_pb::PasswordSpecificsMetadata& proto) { | |
90 VISIT(url); | 93 VISIT(url); |
91 } | 94 } |
92 | 95 |
93 template <class V> | 96 VISIT_PROTO_FIELDS(const sync_pb::AppNotificationSettings& proto) { |
94 void VisitProtoFields(V& visitor, | |
95 const sync_pb::AppNotificationSettings& proto) { | |
96 VISIT(initial_setup_done); | 97 VISIT(initial_setup_done); |
97 VISIT(disabled); | 98 VISIT(disabled); |
98 VISIT(oauth_client_id); | 99 VISIT(oauth_client_id); |
99 } | 100 } |
100 | 101 |
101 template <class V> | 102 VISIT_PROTO_FIELDS(const sync_pb::SessionHeader& proto) { |
102 void VisitProtoFields(V& visitor, const sync_pb::SessionHeader& proto) { | |
103 VISIT_REP(window); | 103 VISIT_REP(window); |
104 VISIT(client_name); | 104 VISIT(client_name); |
105 VISIT_ENUM(device_type); | 105 VISIT_ENUM(device_type); |
106 } | 106 } |
107 | 107 |
108 template <class V> | 108 VISIT_PROTO_FIELDS(const sync_pb::SessionTab& proto) { |
109 void VisitProtoFields(V& visitor, const sync_pb::SessionTab& proto) { | |
110 VISIT(tab_id); | 109 VISIT(tab_id); |
111 VISIT(window_id); | 110 VISIT(window_id); |
112 VISIT(tab_visual_index); | 111 VISIT(tab_visual_index); |
113 VISIT(current_navigation_index); | 112 VISIT(current_navigation_index); |
114 VISIT(pinned); | 113 VISIT(pinned); |
115 VISIT(extension_app_id); | 114 VISIT(extension_app_id); |
116 VISIT_REP(navigation); | 115 VISIT_REP(navigation); |
117 VISIT_BYTES(favicon); | 116 VISIT_BYTES(favicon); |
118 VISIT_ENUM(favicon_type); | 117 VISIT_ENUM(favicon_type); |
119 VISIT(favicon_source); | 118 VISIT(favicon_source); |
120 VISIT_REP(variation_id); | 119 VISIT_REP(variation_id); |
121 } | 120 } |
122 | 121 |
123 template <class V> | 122 VISIT_PROTO_FIELDS(const sync_pb::SessionWindow& proto) { |
124 void VisitProtoFields(V& visitor, const sync_pb::SessionWindow& proto) { | |
125 VISIT(window_id); | 123 VISIT(window_id); |
126 VISIT(selected_tab_index); | 124 VISIT(selected_tab_index); |
127 VISIT_REP(tab); | 125 VISIT_REP(tab); |
128 VISIT_ENUM(browser_type); | 126 VISIT_ENUM(browser_type); |
129 } | 127 } |
130 | 128 |
131 template <class V> | 129 VISIT_PROTO_FIELDS(const sync_pb::TabNavigation& proto) { |
132 void VisitProtoFields(V& visitor, const sync_pb::TabNavigation& proto) { | |
133 VISIT(virtual_url); | 130 VISIT(virtual_url); |
134 VISIT(referrer); | 131 VISIT(referrer); |
135 VISIT(title); | 132 VISIT(title); |
136 VISIT_ENUM(page_transition); | 133 VISIT_ENUM(page_transition); |
137 VISIT_ENUM(redirect_type); | 134 VISIT_ENUM(redirect_type); |
138 VISIT(unique_id); | 135 VISIT(unique_id); |
139 VISIT(timestamp_msec); | 136 VISIT(timestamp_msec); |
140 VISIT(navigation_forward_back); | 137 VISIT(navigation_forward_back); |
141 VISIT(navigation_from_address_bar); | 138 VISIT(navigation_from_address_bar); |
142 VISIT(navigation_home_page); | 139 VISIT(navigation_home_page); |
143 VISIT(navigation_chain_start); | 140 VISIT(navigation_chain_start); |
144 VISIT(navigation_chain_end); | 141 VISIT(navigation_chain_end); |
145 VISIT(global_id); | 142 VISIT(global_id); |
146 VISIT(search_terms); | 143 VISIT(search_terms); |
147 VISIT(favicon_url); | 144 VISIT(favicon_url); |
148 VISIT_ENUM(blocked_state); | 145 VISIT_ENUM(blocked_state); |
149 VISIT_REP(content_pack_categories); | 146 VISIT_REP(content_pack_categories); |
150 VISIT(http_status_code); | 147 VISIT(http_status_code); |
151 VISIT(obsolete_referrer_policy); | 148 VISIT(obsolete_referrer_policy); |
152 VISIT(is_restored); | 149 VISIT(is_restored); |
153 VISIT_REP(navigation_redirect); | 150 VISIT_REP(navigation_redirect); |
154 VISIT(last_navigation_redirect_url); | 151 VISIT(last_navigation_redirect_url); |
155 VISIT(correct_referrer_policy); | 152 VISIT(correct_referrer_policy); |
156 VISIT_ENUM(password_state); | 153 VISIT_ENUM(password_state); |
157 } | 154 } |
158 | 155 |
159 template <class V> | 156 VISIT_PROTO_FIELDS(const sync_pb::NavigationRedirect& proto) { |
160 void VisitProtoFields(V& visitor, const sync_pb::NavigationRedirect& proto) { | |
161 VISIT(url); | 157 VISIT(url); |
162 } | 158 } |
163 | 159 |
164 template <class V> | 160 VISIT_PROTO_FIELDS(const sync_pb::PasswordSpecificsData& proto) { |
165 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecificsData& proto) { | |
166 VISIT(scheme); | 161 VISIT(scheme); |
167 VISIT(signon_realm); | 162 VISIT(signon_realm); |
168 VISIT(origin); | 163 VISIT(origin); |
169 VISIT(action); | 164 VISIT(action); |
170 VISIT(username_element); | 165 VISIT(username_element); |
171 VISIT(username_value); | 166 VISIT(username_value); |
172 VISIT(password_element); | 167 VISIT(password_element); |
173 VISIT(preferred); | 168 VISIT(preferred); |
174 VISIT(date_created); | 169 VISIT(date_created); |
175 VISIT(blacklisted); | 170 VISIT(blacklisted); |
176 VISIT(type); | 171 VISIT(type); |
177 VISIT(times_used); | 172 VISIT(times_used); |
178 VISIT(display_name); | 173 VISIT(display_name); |
179 VISIT(avatar_url); | 174 VISIT(avatar_url); |
180 VISIT(federation_url); | 175 VISIT(federation_url); |
181 } | 176 } |
182 | 177 |
183 template <class V> | 178 VISIT_PROTO_FIELDS(const sync_pb::GlobalIdDirective& proto) { |
184 void VisitProtoFields(V& visitor, const sync_pb::GlobalIdDirective& proto) { | |
185 VISIT_REP(global_id); | 179 VISIT_REP(global_id); |
186 VISIT(start_time_usec); | 180 VISIT(start_time_usec); |
187 VISIT(end_time_usec); | 181 VISIT(end_time_usec); |
188 } | 182 } |
189 | 183 |
190 template <class V> | 184 VISIT_PROTO_FIELDS(const sync_pb::TimeRangeDirective& proto) { |
191 void VisitProtoFields(V& visitor, const sync_pb::TimeRangeDirective& proto) { | |
192 VISIT(start_time_usec); | 185 VISIT(start_time_usec); |
193 VISIT(end_time_usec); | 186 VISIT(end_time_usec); |
194 } | 187 } |
195 | 188 |
196 template <class V> | 189 VISIT_PROTO_FIELDS(const sync_pb::AppListSpecifics& proto) { |
197 void VisitProtoFields(V& visitor, const sync_pb::AppListSpecifics& proto) { | |
198 VISIT(item_id); | 190 VISIT(item_id); |
199 VISIT_ENUM(item_type); | 191 VISIT_ENUM(item_type); |
200 VISIT(item_name); | 192 VISIT(item_name); |
201 VISIT(parent_id); | 193 VISIT(parent_id); |
202 VISIT(item_ordinal); | 194 VISIT(item_ordinal); |
203 VISIT(item_pin_ordinal); | 195 VISIT(item_pin_ordinal); |
204 } | 196 } |
205 | 197 |
206 template <class V> | 198 VISIT_PROTO_FIELDS(const sync_pb::ArcPackageSpecifics& proto) { |
207 void VisitProtoFields(V& visitor, const sync_pb::ArcPackageSpecifics& proto) { | |
208 VISIT(package_name); | 199 VISIT(package_name); |
209 VISIT(package_version); | 200 VISIT(package_version); |
210 VISIT(last_backup_android_id); | 201 VISIT(last_backup_android_id); |
211 VISIT(last_backup_time); | 202 VISIT(last_backup_time); |
212 } | 203 } |
213 | 204 |
214 template <class V> | 205 VISIT_PROTO_FIELDS(const sync_pb::PrinterPPDReference& proto) { |
215 void VisitProtoFields(V& visitor, const sync_pb::PrinterPPDReference& proto) { | |
216 VISIT(user_supplied_ppd_url); | 206 VISIT(user_supplied_ppd_url); |
217 VISIT(effective_manufacturer); | 207 VISIT(effective_manufacturer); |
218 VISIT(effective_model); | 208 VISIT(effective_model); |
219 } | 209 } |
220 | 210 |
221 template <class V> | 211 VISIT_PROTO_FIELDS(const sync_pb::ReadingListSpecifics& proto) { |
222 void VisitProtoFields(V& visitor, const sync_pb::ReadingListSpecifics& proto) { | |
223 VISIT(entry_id); | 212 VISIT(entry_id); |
224 VISIT(title); | 213 VISIT(title); |
225 VISIT(url); | 214 VISIT(url); |
226 VISIT(creation_time_us); | 215 VISIT(creation_time_us); |
227 VISIT(update_time_us); | 216 VISIT(update_time_us); |
228 VISIT_ENUM(status); | 217 VISIT_ENUM(status); |
229 } | 218 } |
230 | 219 |
231 template <class V> | 220 VISIT_PROTO_FIELDS(const sync_pb::AppNotification& proto) { |
232 void VisitProtoFields(V& visitor, const sync_pb::AppNotification& proto) { | |
233 VISIT(guid); | 221 VISIT(guid); |
234 VISIT(app_id); | 222 VISIT(app_id); |
235 VISIT(creation_timestamp_ms); | 223 VISIT(creation_timestamp_ms); |
236 VISIT(title); | 224 VISIT(title); |
237 VISIT(body_text); | 225 VISIT(body_text); |
238 VISIT(link_url); | 226 VISIT(link_url); |
239 VISIT(link_text); | 227 VISIT(link_text); |
240 } | 228 } |
241 | 229 |
242 template <class V> | 230 VISIT_PROTO_FIELDS(const sync_pb::AppSettingSpecifics& proto) { |
243 void VisitProtoFields(V& visitor, const sync_pb::AppSettingSpecifics& proto) { | |
244 VISIT(extension_setting); | 231 VISIT(extension_setting); |
245 } | 232 } |
246 | 233 |
247 template <class V> | 234 VISIT_PROTO_FIELDS(const sync_pb::LinkedAppIconInfo& proto) { |
248 void VisitProtoFields(V& visitor, const sync_pb::LinkedAppIconInfo& proto) { | |
249 VISIT(url); | 235 VISIT(url); |
250 VISIT(size); | 236 VISIT(size); |
251 } | 237 } |
252 | 238 |
253 template <class V> | 239 VISIT_PROTO_FIELDS(const sync_pb::AppSpecifics& proto) { |
254 void VisitProtoFields(V& visitor, const sync_pb::AppSpecifics& proto) { | |
255 VISIT(extension); | 240 VISIT(extension); |
256 VISIT(notification_settings); | 241 VISIT(notification_settings); |
257 VISIT(app_launch_ordinal); | 242 VISIT(app_launch_ordinal); |
258 VISIT(page_ordinal); | 243 VISIT(page_ordinal); |
259 VISIT_ENUM(launch_type); | 244 VISIT_ENUM(launch_type); |
260 VISIT(bookmark_app_url); | 245 VISIT(bookmark_app_url); |
261 VISIT(bookmark_app_description); | 246 VISIT(bookmark_app_description); |
262 VISIT(bookmark_app_icon_color); | 247 VISIT(bookmark_app_icon_color); |
263 VISIT_REP(linked_app_icons); | 248 VISIT_REP(linked_app_icons); |
264 | |
265 } | 249 } |
266 | 250 |
267 template <class V> | 251 VISIT_PROTO_FIELDS(const sync_pb::AutofillSpecifics& proto) { |
268 void VisitProtoFields(V& visitor, const sync_pb::AutofillSpecifics& proto) { | |
269 VISIT(name); | 252 VISIT(name); |
270 VISIT(value); | 253 VISIT(value); |
271 VISIT_REP(usage_timestamp); | 254 VISIT_REP(usage_timestamp); |
272 VISIT(profile); | 255 VISIT(profile); |
273 } | 256 } |
274 | 257 |
275 template <class V> | 258 VISIT_PROTO_FIELDS(const sync_pb::AutofillProfileSpecifics& proto) { |
276 void VisitProtoFields(V& visitor, | |
277 const sync_pb::AutofillProfileSpecifics& proto) { | |
278 VISIT(guid); | 259 VISIT(guid); |
279 VISIT(origin); | 260 VISIT(origin); |
280 VISIT(use_count); | 261 VISIT(use_count); |
281 VISIT(use_date); | 262 VISIT(use_date); |
282 VISIT_REP(name_first); | 263 VISIT_REP(name_first); |
283 VISIT_REP(name_middle); | 264 VISIT_REP(name_middle); |
284 VISIT_REP(name_last); | 265 VISIT_REP(name_last); |
285 VISIT_REP(name_full); | 266 VISIT_REP(name_full); |
286 VISIT_REP(email_address); | 267 VISIT_REP(email_address); |
287 VISIT(company_name); | 268 VISIT(company_name); |
288 VISIT(address_home_line1); | 269 VISIT(address_home_line1); |
289 VISIT(address_home_line2); | 270 VISIT(address_home_line2); |
290 VISIT(address_home_city); | 271 VISIT(address_home_city); |
291 VISIT(address_home_state); | 272 VISIT(address_home_state); |
292 VISIT(address_home_zip); | 273 VISIT(address_home_zip); |
293 VISIT(address_home_country); | 274 VISIT(address_home_country); |
294 VISIT(address_home_street_address); | 275 VISIT(address_home_street_address); |
295 VISIT(address_home_sorting_code); | 276 VISIT(address_home_sorting_code); |
296 VISIT(address_home_dependent_locality); | 277 VISIT(address_home_dependent_locality); |
297 VISIT(address_home_language_code); | 278 VISIT(address_home_language_code); |
298 VISIT_REP(phone_home_whole_number); | 279 VISIT_REP(phone_home_whole_number); |
299 } | 280 } |
300 | 281 |
301 template <class V> | 282 VISIT_PROTO_FIELDS(const sync_pb::WalletMetadataSpecifics& proto) { |
302 void VisitProtoFields(V& visitor, | |
303 const sync_pb::WalletMetadataSpecifics& proto) { | |
304 VISIT_ENUM(type); | 283 VISIT_ENUM(type); |
305 VISIT(id); | 284 VISIT(id); |
306 VISIT(use_count); | 285 VISIT(use_count); |
307 VISIT(use_date); | 286 VISIT(use_date); |
308 } | 287 } |
309 | 288 |
310 template <class V> | 289 VISIT_PROTO_FIELDS(const sync_pb::AutofillWalletSpecifics& proto) { |
311 void VisitProtoFields(V& visitor, | |
312 const sync_pb::AutofillWalletSpecifics& proto) { | |
313 VISIT_ENUM(type); | 290 VISIT_ENUM(type); |
314 VISIT(masked_card); | 291 VISIT(masked_card); |
315 VISIT(address); | 292 VISIT(address); |
316 } | 293 } |
317 | 294 |
318 template <class V> | 295 VISIT_PROTO_FIELDS(const sync_pb::MetaInfo& proto) { |
319 void VisitProtoFields(V& visitor, const sync_pb::MetaInfo& proto) { | |
320 VISIT(key); | 296 VISIT(key); |
321 VISIT(value); | 297 VISIT(value); |
322 } | 298 } |
323 | 299 |
324 template <class V> | 300 VISIT_PROTO_FIELDS(const sync_pb::BookmarkSpecifics& proto) { |
325 void VisitProtoFields(V& visitor, const sync_pb::BookmarkSpecifics& proto) { | |
326 VISIT(url); | 301 VISIT(url); |
327 VISIT_BYTES(favicon); | 302 VISIT_BYTES(favicon); |
328 VISIT(title); | 303 VISIT(title); |
329 VISIT(creation_time_us); | 304 VISIT(creation_time_us); |
330 VISIT(icon_url); | 305 VISIT(icon_url); |
331 VISIT_REP(meta_info); | 306 VISIT_REP(meta_info); |
332 } | 307 } |
333 | 308 |
334 template <class V> | 309 VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { |
335 void VisitProtoFields(V& visitor, const sync_pb::DeviceInfoSpecifics& proto) { | |
336 VISIT(cache_guid); | 310 VISIT(cache_guid); |
337 VISIT(client_name); | 311 VISIT(client_name); |
338 VISIT_ENUM(device_type); | 312 VISIT_ENUM(device_type); |
339 VISIT(sync_user_agent); | 313 VISIT(sync_user_agent); |
340 VISIT(chrome_version); | 314 VISIT(chrome_version); |
341 VISIT(signin_scoped_device_id); | 315 VISIT(signin_scoped_device_id); |
342 } | 316 } |
343 | 317 VISIT_PROTO_FIELDS(const sync_pb::DictionarySpecifics& proto) { |
344 template <class V> | |
345 void VisitProtoFields(V& visitor, const sync_pb::DictionarySpecifics& proto) { | |
346 VISIT(word); | 318 VISIT(word); |
347 } | 319 } |
348 | 320 |
349 template <class V> | 321 VISIT_PROTO_FIELDS(const sync_pb::FaviconSyncFlags& proto) { |
350 void VisitProtoFields(V& visitor, const sync_pb::FaviconSyncFlags& proto) { | |
351 VISIT(enabled); | 322 VISIT(enabled); |
352 VISIT(favicon_sync_limit); | 323 VISIT(favicon_sync_limit); |
353 } | 324 } |
354 | 325 |
355 template <class V> | 326 VISIT_PROTO_FIELDS(const sync_pb::KeystoreEncryptionFlags& proto) { |
356 void VisitProtoFields(V& visitor, | |
357 const sync_pb::KeystoreEncryptionFlags& proto) { | |
358 VISIT(enabled); | 327 VISIT(enabled); |
359 } | 328 } |
360 | 329 |
361 template <class V> | 330 VISIT_PROTO_FIELDS(const sync_pb::HistoryDeleteDirectives& proto) { |
362 void VisitProtoFields(V& visitor, | |
363 const sync_pb::HistoryDeleteDirectives& proto) { | |
364 VISIT(enabled); | 331 VISIT(enabled); |
365 } | 332 } |
366 | 333 |
367 template <class V> | 334 VISIT_PROTO_FIELDS(const sync_pb::AutofillCullingFlags& proto) { |
368 void VisitProtoFields(V& visitor, const sync_pb::AutofillCullingFlags& proto) { | |
369 VISIT(enabled); | 335 VISIT(enabled); |
370 } | 336 } |
371 | 337 |
372 template <class V> | 338 VISIT_PROTO_FIELDS(const sync_pb::PreCommitUpdateAvoidanceFlags& proto) { |
373 void VisitProtoFields(V& visitor, | |
374 const sync_pb::PreCommitUpdateAvoidanceFlags& proto) { | |
375 VISIT(enabled); | 339 VISIT(enabled); |
376 } | 340 } |
377 | 341 |
378 template <class V> | 342 VISIT_PROTO_FIELDS(const sync_pb::GcmChannelFlags& proto) { |
379 void VisitProtoFields(V& visitor, const sync_pb::GcmChannelFlags& proto) { | |
380 VISIT(enabled); | 343 VISIT(enabled); |
381 } | 344 } |
382 | 345 |
383 template <class V> | 346 VISIT_PROTO_FIELDS(const sync_pb::GcmInvalidationsFlags& proto) { |
384 void VisitProtoFields(V& visitor, const sync_pb::GcmInvalidationsFlags& proto) { | |
385 VISIT(enabled); | 347 VISIT(enabled); |
386 } | 348 } |
387 | 349 |
388 template <class V> | 350 VISIT_PROTO_FIELDS(const sync_pb::ExperimentsSpecifics& proto) { |
389 void VisitProtoFields(V& visitor, const sync_pb::ExperimentsSpecifics& proto) { | |
390 VISIT(keystore_encryption); | 351 VISIT(keystore_encryption); |
391 VISIT(history_delete_directives); | 352 VISIT(history_delete_directives); |
392 VISIT(autofill_culling); | 353 VISIT(autofill_culling); |
393 VISIT(pre_commit_update_avoidance); | 354 VISIT(pre_commit_update_avoidance); |
394 VISIT(favicon_sync); | 355 VISIT(favicon_sync); |
395 VISIT(gcm_channel); | 356 VISIT(gcm_channel); |
396 VISIT(gcm_invalidations); | 357 VISIT(gcm_invalidations); |
397 } | 358 } |
398 | 359 |
399 template <class V> | 360 VISIT_PROTO_FIELDS(const sync_pb::ExtensionSettingSpecifics& proto) { |
400 void VisitProtoFields(V& visitor, | |
401 const sync_pb::ExtensionSettingSpecifics& proto) { | |
402 VISIT(extension_id); | 361 VISIT(extension_id); |
403 VISIT(key); | 362 VISIT(key); |
404 VISIT(value); | 363 VISIT(value); |
405 } | 364 } |
406 | 365 |
407 template <class V> | 366 VISIT_PROTO_FIELDS(const sync_pb::ExtensionSpecifics& proto) { |
408 void VisitProtoFields(V& visitor, const sync_pb::ExtensionSpecifics& proto) { | |
409 VISIT(id); | 367 VISIT(id); |
410 VISIT(version); | 368 VISIT(version); |
411 VISIT(update_url); | 369 VISIT(update_url); |
412 VISIT(enabled); | 370 VISIT(enabled); |
413 VISIT(incognito_enabled); | 371 VISIT(incognito_enabled); |
414 VISIT(name); | 372 VISIT(name); |
415 VISIT(remote_install); | 373 VISIT(remote_install); |
416 VISIT(installed_by_custodian); | 374 VISIT(installed_by_custodian); |
417 VISIT(all_urls_enabled); | 375 VISIT(all_urls_enabled); |
418 VISIT(disable_reasons); | 376 VISIT(disable_reasons); |
419 } | 377 } |
420 | 378 |
421 template <class V> | 379 VISIT_PROTO_FIELDS(const sync_pb::FaviconData& proto) { |
422 void VisitProtoFields(V& visitor, const sync_pb::FaviconData& proto) { | |
423 VISIT_BYTES(favicon); | 380 VISIT_BYTES(favicon); |
424 VISIT(width); | 381 VISIT(width); |
425 VISIT(height); | 382 VISIT(height); |
426 } | 383 } |
427 | 384 |
428 template <class V> | 385 VISIT_PROTO_FIELDS(const sync_pb::FaviconImageSpecifics& proto) { |
429 void VisitProtoFields(V& visitor, const sync_pb::FaviconImageSpecifics& proto) { | |
430 VISIT(favicon_url); | 386 VISIT(favicon_url); |
431 VISIT(favicon_web); | 387 VISIT(favicon_web); |
432 VISIT(favicon_web_32); | 388 VISIT(favicon_web_32); |
433 VISIT(favicon_touch_64); | 389 VISIT(favicon_touch_64); |
434 VISIT(favicon_touch_precomposed_64); | 390 VISIT(favicon_touch_precomposed_64); |
435 } | 391 } |
436 | 392 |
437 template <class V> | 393 VISIT_PROTO_FIELDS(const sync_pb::FaviconTrackingSpecifics& proto) { |
438 void VisitProtoFields(V& visitor, | |
439 const sync_pb::FaviconTrackingSpecifics& proto) { | |
440 VISIT(favicon_url); | 394 VISIT(favicon_url); |
441 VISIT(last_visit_time_ms); | 395 VISIT(last_visit_time_ms); |
442 VISIT(is_bookmarked); | 396 VISIT(is_bookmarked); |
443 } | 397 } |
444 | 398 |
445 template <class V> | 399 VISIT_PROTO_FIELDS(const sync_pb::HistoryDeleteDirectiveSpecifics& proto) { |
446 void VisitProtoFields(V& visitor, | |
447 const sync_pb::HistoryDeleteDirectiveSpecifics& proto) { | |
448 VISIT(global_id_directive); | 400 VISIT(global_id_directive); |
449 VISIT(time_range_directive); | 401 VISIT(time_range_directive); |
450 } | 402 } |
451 | 403 |
452 template <class V> | 404 VISIT_PROTO_FIELDS(const sync_pb::ManagedUserSettingSpecifics& proto) { |
453 void VisitProtoFields(V& visitor, | |
454 const sync_pb::ManagedUserSettingSpecifics& proto) { | |
455 VISIT(name); | 405 VISIT(name); |
456 VISIT(value); | 406 VISIT(value); |
457 } | 407 } |
458 | 408 |
459 template <class V> | 409 VISIT_PROTO_FIELDS(const sync_pb::ManagedUserSpecifics& proto) { |
460 void VisitProtoFields(V& visitor, const sync_pb::ManagedUserSpecifics& proto) { | |
461 VISIT(id); | 410 VISIT(id); |
462 VISIT(name); | 411 VISIT(name); |
463 VISIT(acknowledged); | 412 VISIT(acknowledged); |
464 VISIT(master_key); | 413 VISIT(master_key); |
465 VISIT(chrome_avatar); | 414 VISIT(chrome_avatar); |
466 VISIT(chromeos_avatar); | 415 VISIT(chromeos_avatar); |
467 } | 416 } |
468 | 417 |
469 template <class V> | 418 VISIT_PROTO_FIELDS(const sync_pb::ManagedUserSharedSettingSpecifics& proto) { |
470 void VisitProtoFields(V& visitor, | |
471 const sync_pb::ManagedUserSharedSettingSpecifics& proto) { | |
472 VISIT(mu_id); | 419 VISIT(mu_id); |
473 VISIT(key); | 420 VISIT(key); |
474 VISIT(value); | 421 VISIT(value); |
475 VISIT(acknowledged); | 422 VISIT(acknowledged); |
476 } | 423 } |
477 | 424 |
478 template <class V> | 425 VISIT_PROTO_FIELDS(const sync_pb::ManagedUserWhitelistSpecifics& proto) { |
479 void VisitProtoFields(V& visitor, | |
480 const sync_pb::ManagedUserWhitelistSpecifics& proto) { | |
481 VISIT(id); | 426 VISIT(id); |
482 VISIT(name); | 427 VISIT(name); |
483 } | 428 } |
484 | 429 |
485 template <class V> | 430 VISIT_PROTO_FIELDS(const sync_pb::NigoriSpecifics& proto) { |
486 void VisitProtoFields(V& visitor, const sync_pb::NigoriSpecifics& proto) { | |
487 VISIT(encryption_keybag); | 431 VISIT(encryption_keybag); |
488 VISIT(keybag_is_frozen); | 432 VISIT(keybag_is_frozen); |
489 VISIT(encrypt_bookmarks); | 433 VISIT(encrypt_bookmarks); |
490 VISIT(encrypt_preferences); | 434 VISIT(encrypt_preferences); |
491 VISIT(encrypt_autofill_profile); | 435 VISIT(encrypt_autofill_profile); |
492 VISIT(encrypt_autofill); | 436 VISIT(encrypt_autofill); |
493 VISIT(encrypt_themes); | 437 VISIT(encrypt_themes); |
494 VISIT(encrypt_typed_urls); | 438 VISIT(encrypt_typed_urls); |
495 VISIT(encrypt_extension_settings); | 439 VISIT(encrypt_extension_settings); |
496 VISIT(encrypt_extensions); | 440 VISIT(encrypt_extensions); |
497 VISIT(encrypt_sessions); | 441 VISIT(encrypt_sessions); |
498 VISIT(encrypt_app_settings); | 442 VISIT(encrypt_app_settings); |
499 VISIT(encrypt_apps); | 443 VISIT(encrypt_apps); |
500 VISIT(encrypt_search_engines); | 444 VISIT(encrypt_search_engines); |
501 VISIT(encrypt_dictionary); | 445 VISIT(encrypt_dictionary); |
502 VISIT(encrypt_articles); | 446 VISIT(encrypt_articles); |
503 VISIT(encrypt_app_list); | 447 VISIT(encrypt_app_list); |
504 VISIT(encrypt_arc_package); | 448 VISIT(encrypt_arc_package); |
505 VISIT(encrypt_reading_list); | 449 VISIT(encrypt_reading_list); |
506 VISIT(encrypt_everything); | 450 VISIT(encrypt_everything); |
507 VISIT(server_only_was_missing_keystore_migration_time); | 451 VISIT(server_only_was_missing_keystore_migration_time); |
508 VISIT(sync_tab_favicons); | 452 VISIT(sync_tab_favicons); |
509 VISIT_ENUM(passphrase_type); | 453 VISIT_ENUM(passphrase_type); |
510 VISIT(keystore_decryptor_token); | 454 VISIT(keystore_decryptor_token); |
511 VISIT(keystore_migration_time); | 455 VISIT(keystore_migration_time); |
512 VISIT(custom_passphrase_time); | 456 VISIT(custom_passphrase_time); |
513 } | 457 } |
514 | 458 |
515 template <class V> | 459 VISIT_PROTO_FIELDS(const sync_pb::ArticlePage& proto) { |
516 void VisitProtoFields(V& visitor, const sync_pb::ArticlePage& proto) { | |
517 VISIT(url); | 460 VISIT(url); |
518 } | 461 } |
519 | 462 |
520 template <class V> | 463 VISIT_PROTO_FIELDS(const sync_pb::ArticleSpecifics& proto) { |
521 void VisitProtoFields(V& visitor, const sync_pb::ArticleSpecifics& proto) { | |
522 VISIT(entry_id); | 464 VISIT(entry_id); |
523 VISIT(title); | 465 VISIT(title); |
524 VISIT_REP(pages); | 466 VISIT_REP(pages); |
525 } | 467 } |
526 | 468 |
527 template <class V> | 469 VISIT_PROTO_FIELDS(const sync_pb::PasswordSpecifics& proto) { |
528 void VisitProtoFields(V& visitor, const sync_pb::PasswordSpecifics& proto) { | |
529 VISIT(encrypted); | 470 VISIT(encrypted); |
530 VISIT(unencrypted_metadata); | 471 VISIT(unencrypted_metadata); |
531 } | 472 } |
532 | 473 |
533 template <class V> | 474 VISIT_PROTO_FIELDS(const sync_pb::PreferenceSpecifics& proto) { |
534 void VisitProtoFields(V& visitor, const sync_pb::PreferenceSpecifics& proto) { | |
535 VISIT(name); | 475 VISIT(name); |
536 VISIT(value); | 476 VISIT(value); |
537 } | 477 } |
538 | 478 |
539 template <class V> | 479 VISIT_PROTO_FIELDS(const sync_pb::PrinterSpecifics& proto) { |
540 void VisitProtoFields(V& visitor, const sync_pb::PrinterSpecifics& proto) { | |
541 VISIT(id); | 480 VISIT(id); |
542 VISIT(display_name); | 481 VISIT(display_name); |
543 VISIT(description); | 482 VISIT(description); |
544 VISIT(manufacturer); | 483 VISIT(manufacturer); |
545 VISIT(model); | 484 VISIT(model); |
546 VISIT(uri); | 485 VISIT(uri); |
547 VISIT(uuid); | 486 VISIT(uuid); |
548 VISIT(ppd_reference); | 487 VISIT(ppd_reference); |
549 } | 488 } |
550 | 489 |
551 template <class V> | 490 VISIT_PROTO_FIELDS(const sync_pb::PriorityPreferenceSpecifics& proto) { |
552 void VisitProtoFields(V& visitor, | |
553 const sync_pb::PriorityPreferenceSpecifics& proto) { | |
554 VISIT(preference); | 491 VISIT(preference); |
555 } | 492 } |
556 | 493 |
557 template <class V> | 494 VISIT_PROTO_FIELDS(const sync_pb::SyncedNotificationAppInfoSpecifics& proto) {} |
558 void VisitProtoFields( | |
559 V& visitor, | |
560 const sync_pb::SyncedNotificationAppInfoSpecifics& proto) { | |
561 } | |
562 | 495 |
563 template <class V> | 496 VISIT_PROTO_FIELDS(const sync_pb::SyncedNotificationSpecifics& proto) {} |
564 void VisitProtoFields(V& visitor, | |
565 const sync_pb::SyncedNotificationSpecifics& proto) { | |
566 } | |
567 | 497 |
568 template <class V> | 498 VISIT_PROTO_FIELDS(const sync_pb::SearchEngineSpecifics& proto) { |
569 void VisitProtoFields(V& visitor, const sync_pb::SearchEngineSpecifics& proto) { | |
570 VISIT(short_name); | 499 VISIT(short_name); |
571 VISIT(keyword); | 500 VISIT(keyword); |
572 VISIT(favicon_url); | 501 VISIT(favicon_url); |
573 VISIT(url); | 502 VISIT(url); |
574 VISIT(safe_for_autoreplace); | 503 VISIT(safe_for_autoreplace); |
575 VISIT(originating_url); | 504 VISIT(originating_url); |
576 VISIT(date_created); | 505 VISIT(date_created); |
577 VISIT(input_encodings); | 506 VISIT(input_encodings); |
578 VISIT(show_in_default_list); | |
579 VISIT(suggestions_url); | 507 VISIT(suggestions_url); |
580 VISIT(prepopulate_id); | 508 VISIT(prepopulate_id); |
581 VISIT(autogenerate_keyword); | 509 VISIT(autogenerate_keyword); |
582 VISIT(instant_url); | 510 VISIT(instant_url); |
583 VISIT(last_modified); | 511 VISIT(last_modified); |
584 VISIT(sync_guid); | 512 VISIT(sync_guid); |
585 VISIT_REP(alternate_urls); | 513 VISIT_REP(alternate_urls); |
586 VISIT(search_terms_replacement_key); | 514 VISIT(search_terms_replacement_key); |
587 VISIT(image_url); | 515 VISIT(image_url); |
588 VISIT(search_url_post_params); | 516 VISIT(search_url_post_params); |
589 VISIT(suggestions_url_post_params); | 517 VISIT(suggestions_url_post_params); |
590 VISIT(instant_url_post_params); | 518 VISIT(instant_url_post_params); |
591 VISIT(image_url_post_params); | 519 VISIT(image_url_post_params); |
592 VISIT(new_tab_url); | 520 VISIT(new_tab_url); |
593 } | 521 } |
594 | 522 |
595 template <class V> | 523 VISIT_PROTO_FIELDS(const sync_pb::SessionSpecifics& proto) { |
596 void VisitProtoFields(V& visitor, const sync_pb::SessionSpecifics& proto) { | |
597 VISIT(session_tag); | 524 VISIT(session_tag); |
598 VISIT(header); | 525 VISIT(header); |
599 VISIT(tab); | 526 VISIT(tab); |
600 VISIT(tab_node_id); | 527 VISIT(tab_node_id); |
601 } | 528 } |
602 | 529 |
603 template <class V> | 530 VISIT_PROTO_FIELDS(const sync_pb::ThemeSpecifics& proto) { |
604 void VisitProtoFields(V& visitor, const sync_pb::ThemeSpecifics& proto) { | |
605 VISIT(use_custom_theme); | 531 VISIT(use_custom_theme); |
606 VISIT(use_system_theme_by_default); | 532 VISIT(use_system_theme_by_default); |
607 VISIT(custom_theme_name); | 533 VISIT(custom_theme_name); |
608 VISIT(custom_theme_id); | 534 VISIT(custom_theme_id); |
609 VISIT(custom_theme_update_url); | 535 VISIT(custom_theme_update_url); |
610 } | 536 } |
611 | 537 |
612 template <class V> | 538 VISIT_PROTO_FIELDS(const sync_pb::TypedUrlSpecifics& proto) { |
613 void VisitProtoFields(V& visitor, const sync_pb::TypedUrlSpecifics& proto) { | |
614 VISIT(url); | 539 VISIT(url); |
615 VISIT(title); | 540 VISIT(title); |
616 VISIT(hidden); | 541 VISIT(hidden); |
617 VISIT_REP(visits); | 542 VISIT_REP(visits); |
618 VISIT_REP(visit_transitions); | 543 VISIT_REP(visit_transitions); |
619 } | 544 } |
620 | 545 |
621 template <class V> | 546 VISIT_PROTO_FIELDS(const sync_pb::WalletMaskedCreditCard& proto) { |
622 void VisitProtoFields(V& visitor, | |
623 const sync_pb::WalletMaskedCreditCard& proto) { | |
624 VISIT(id); | 547 VISIT(id); |
625 VISIT_ENUM(status); | 548 VISIT_ENUM(status); |
626 VISIT(name_on_card); | 549 VISIT(name_on_card); |
627 VISIT_ENUM(type); | 550 VISIT_ENUM(type); |
628 VISIT(last_four); | 551 VISIT(last_four); |
629 VISIT(exp_month); | 552 VISIT(exp_month); |
630 VISIT(exp_year); | 553 VISIT(exp_year); |
631 VISIT(billing_address_id); | 554 VISIT(billing_address_id); |
632 } | 555 } |
633 | 556 |
634 template <class V> | 557 VISIT_PROTO_FIELDS(const sync_pb::WalletPostalAddress& proto) { |
635 void VisitProtoFields(V& visitor, const sync_pb::WalletPostalAddress& proto) { | |
636 VISIT(id); | 558 VISIT(id); |
637 VISIT(recipient_name); | 559 VISIT(recipient_name); |
638 VISIT(company_name); | 560 VISIT(company_name); |
639 VISIT_REP(street_address); | 561 VISIT_REP(street_address); |
640 VISIT(address_1); | 562 VISIT(address_1); |
641 VISIT(address_2); | 563 VISIT(address_2); |
642 VISIT(address_3); | 564 VISIT(address_3); |
643 VISIT(address_4); | 565 VISIT(address_4); |
644 VISIT(postal_code); | 566 VISIT(postal_code); |
645 VISIT(sorting_code); | 567 VISIT(sorting_code); |
646 VISIT(country_code); | 568 VISIT(country_code); |
647 VISIT(phone_number); | 569 VISIT(phone_number); |
648 VISIT(language_code); | 570 VISIT(language_code); |
649 } | 571 } |
650 | 572 |
651 template <class V> | 573 VISIT_PROTO_FIELDS(const sync_pb::WifiCredentialSpecifics& proto) { |
652 void VisitProtoFields(V& visitor, | |
653 const sync_pb::WifiCredentialSpecifics& proto) { | |
654 VISIT_BYTES(ssid); | 574 VISIT_BYTES(ssid); |
655 VISIT_ENUM(security_class); | 575 VISIT_ENUM(security_class); |
656 VISIT_BYTES(passphrase); | 576 VISIT_BYTES(passphrase); |
657 } | 577 } |
658 | 578 |
659 template <class V> | 579 VISIT_PROTO_FIELDS(const sync_pb::EntitySpecifics& proto) { |
660 void VisitProtoFields(V& visitor, const sync_pb::EntitySpecifics& proto) { | |
661 VISIT(app); | 580 VISIT(app); |
662 VISIT(app_list); | 581 VISIT(app_list); |
663 VISIT(app_notification); | 582 VISIT(app_notification); |
664 VISIT(app_setting); | 583 VISIT(app_setting); |
665 VISIT(arc_package); | 584 VISIT(arc_package); |
666 VISIT(article); | 585 VISIT(article); |
667 VISIT(autofill); | 586 VISIT(autofill); |
668 VISIT(autofill_profile); | 587 VISIT(autofill_profile); |
669 VISIT(autofill_wallet); | 588 VISIT(autofill_wallet); |
670 VISIT(wallet_metadata); | 589 VISIT(wallet_metadata); |
(...skipping 18 matching lines...) Expand all Loading... |
689 VISIT(reading_list); | 608 VISIT(reading_list); |
690 VISIT(search_engine); | 609 VISIT(search_engine); |
691 VISIT(session); | 610 VISIT(session); |
692 VISIT(synced_notification); | 611 VISIT(synced_notification); |
693 VISIT(synced_notification_app_info); | 612 VISIT(synced_notification_app_info); |
694 VISIT(theme); | 613 VISIT(theme); |
695 VISIT(typed_url); | 614 VISIT(typed_url); |
696 VISIT(wifi_credential); | 615 VISIT(wifi_credential); |
697 } | 616 } |
698 | 617 |
699 template <class V> | 618 VISIT_PROTO_FIELDS(const sync_pb::SyncEntity& proto) { |
700 void VisitProtoFields(V& visitor, const sync_pb::SyncEntity& proto) { | |
701 VISIT(id_string); | 619 VISIT(id_string); |
702 VISIT(parent_id_string); | 620 VISIT(parent_id_string); |
703 VISIT(old_parent_id); | 621 VISIT(old_parent_id); |
704 VISIT(version); | 622 VISIT(version); |
705 VISIT(mtime); | 623 VISIT(mtime); |
706 VISIT(ctime); | 624 VISIT(ctime); |
707 VISIT(name); | 625 VISIT(name); |
708 VISIT(non_unique_name); | 626 VISIT(non_unique_name); |
709 VISIT(sync_timestamp); | 627 VISIT(sync_timestamp); |
710 VISIT(server_defined_unique_tag); | 628 VISIT(server_defined_unique_tag); |
711 VISIT(position_in_parent); | 629 VISIT(position_in_parent); |
712 VISIT(unique_position); | 630 VISIT(unique_position); |
713 VISIT(insert_after_item_id); | 631 VISIT(insert_after_item_id); |
714 VISIT(deleted); | 632 VISIT(deleted); |
715 VISIT(originator_cache_guid); | 633 VISIT(originator_cache_guid); |
716 VISIT(originator_client_item_id); | 634 VISIT(originator_client_item_id); |
717 VISIT(specifics); | 635 VISIT(specifics); |
718 VISIT(folder); | 636 VISIT(folder); |
719 VISIT(client_defined_unique_tag); | 637 VISIT(client_defined_unique_tag); |
720 VISIT_REP(attachment_id); | 638 VISIT_REP(attachment_id); |
721 } | 639 } |
722 | 640 |
723 template <class V> | 641 VISIT_PROTO_FIELDS(const sync_pb::ChromiumExtensionsActivity& proto) { |
724 void VisitProtoFields(V& visitor, | |
725 const sync_pb::ChromiumExtensionsActivity& proto) { | |
726 VISIT(extension_id); | 642 VISIT(extension_id); |
727 VISIT(bookmark_writes_since_last_commit); | 643 VISIT(bookmark_writes_since_last_commit); |
728 } | 644 } |
729 | 645 |
730 template <class V> | 646 VISIT_PROTO_FIELDS(const sync_pb::CommitMessage& proto) { |
731 void VisitProtoFields(V& visitor, const sync_pb::CommitMessage& proto) { | |
732 VISIT_REP(entries); | 647 VISIT_REP(entries); |
733 VISIT(cache_guid); | 648 VISIT(cache_guid); |
734 VISIT_REP(extensions_activity); | 649 VISIT_REP(extensions_activity); |
735 VISIT(config_params); | 650 VISIT(config_params); |
736 } | 651 } |
737 | 652 |
738 template <class V> | 653 VISIT_PROTO_FIELDS(const sync_pb::GetUpdateTriggers& proto) { |
739 void VisitProtoFields(V& visitor, const sync_pb::GetUpdateTriggers& proto) { | |
740 VISIT_REP(notification_hint); | 654 VISIT_REP(notification_hint); |
741 VISIT(client_dropped_hints); | 655 VISIT(client_dropped_hints); |
742 VISIT(invalidations_out_of_sync); | 656 VISIT(invalidations_out_of_sync); |
743 VISIT(local_modification_nudges); | 657 VISIT(local_modification_nudges); |
744 VISIT(datatype_refresh_nudges); | 658 VISIT(datatype_refresh_nudges); |
745 } | 659 } |
746 | 660 |
747 template <class V> | 661 VISIT_PROTO_FIELDS(const sync_pb::DataTypeProgressMarker& proto) { |
748 void VisitProtoFields(V& visitor, | |
749 const sync_pb::DataTypeProgressMarker& proto) { | |
750 VISIT(data_type_id); | 662 VISIT(data_type_id); |
751 VISIT_BYTES(token); | 663 VISIT_BYTES(token); |
752 VISIT(timestamp_token_for_migration); | 664 VISIT(timestamp_token_for_migration); |
753 VISIT(notification_hint); | 665 VISIT(notification_hint); |
754 VISIT(get_update_triggers); | 666 VISIT(get_update_triggers); |
755 } | 667 } |
756 | 668 |
757 template <class V> | 669 VISIT_PROTO_FIELDS(const sync_pb::DataTypeContext& proto) { |
758 void VisitProtoFields(V& visitor, const sync_pb::DataTypeContext& proto) { | |
759 VISIT(data_type_id); | 670 VISIT(data_type_id); |
760 VISIT(context); | 671 VISIT(context); |
761 VISIT(version); | 672 VISIT(version); |
762 } | 673 } |
763 | 674 |
764 template <class V> | 675 VISIT_PROTO_FIELDS(const sync_pb::GetUpdatesCallerInfo& proto) { |
765 void VisitProtoFields(V& visitor, const sync_pb::GetUpdatesCallerInfo& proto) { | |
766 VISIT_ENUM(source); | 676 VISIT_ENUM(source); |
767 VISIT(notifications_enabled); | 677 VISIT(notifications_enabled); |
768 } | 678 } |
769 | 679 |
770 template <class V> | 680 VISIT_PROTO_FIELDS(const sync_pb::GetUpdatesMessage& proto) { |
771 void VisitProtoFields(V& visitor, const sync_pb::GetUpdatesMessage& proto) { | |
772 VISIT(caller_info); | 681 VISIT(caller_info); |
773 VISIT(fetch_folders); | 682 VISIT(fetch_folders); |
774 VISIT(batch_size); | 683 VISIT(batch_size); |
775 VISIT_REP(from_progress_marker); | 684 VISIT_REP(from_progress_marker); |
776 VISIT(streaming); | 685 VISIT(streaming); |
777 VISIT(need_encryption_key); | 686 VISIT(need_encryption_key); |
778 VISIT(create_mobile_bookmarks_folder); | 687 VISIT(create_mobile_bookmarks_folder); |
779 VISIT_ENUM(get_updates_origin); | 688 VISIT_ENUM(get_updates_origin); |
780 VISIT_REP(client_contexts); | 689 VISIT_REP(client_contexts); |
781 } | 690 } |
782 | 691 |
783 template <class V> | 692 VISIT_PROTO_FIELDS(const sync_pb::ClientStatus& proto) { |
784 void VisitProtoFields(V& visitor, const sync_pb::ClientStatus& proto) { | |
785 VISIT(hierarchy_conflict_detected); | 693 VISIT(hierarchy_conflict_detected); |
786 } | 694 } |
787 | 695 |
788 template <class V> | 696 VISIT_PROTO_FIELDS(const sync_pb::CommitResponse::EntryResponse& proto) { |
789 void VisitProtoFields(V& visitor, | |
790 const sync_pb::CommitResponse::EntryResponse& proto) { | |
791 VISIT_ENUM(response_type); | 697 VISIT_ENUM(response_type); |
792 VISIT(id_string); | 698 VISIT(id_string); |
793 VISIT(parent_id_string); | 699 VISIT(parent_id_string); |
794 VISIT(position_in_parent); | 700 VISIT(position_in_parent); |
795 VISIT(version); | 701 VISIT(version); |
796 VISIT(name); | 702 VISIT(name); |
797 VISIT(error_message); | 703 VISIT(error_message); |
798 VISIT(mtime); | 704 VISIT(mtime); |
799 } | 705 } |
800 | 706 |
801 template <class V> | 707 VISIT_PROTO_FIELDS(const sync_pb::CommitResponse& proto) { |
802 void VisitProtoFields(V& visitor, const sync_pb::CommitResponse& proto) { | |
803 VISIT_REP(entryresponse); | 708 VISIT_REP(entryresponse); |
804 } | 709 } |
805 | 710 |
806 template <class V> | 711 VISIT_PROTO_FIELDS(const sync_pb::GetUpdatesResponse& proto) { |
807 void VisitProtoFields(V& visitor, const sync_pb::GetUpdatesResponse& proto) { | |
808 VISIT_REP(entries) | 712 VISIT_REP(entries) |
809 VISIT(changes_remaining); | 713 VISIT(changes_remaining); |
810 VISIT_REP(new_progress_marker); | 714 VISIT_REP(new_progress_marker); |
811 VISIT_REP(context_mutations); | 715 VISIT_REP(context_mutations); |
812 } | 716 } |
813 | 717 |
814 template <class V> | 718 VISIT_PROTO_FIELDS(const sync_pb::ClientCommand& proto) { |
815 void VisitProtoFields(V& visitor, const sync_pb::ClientCommand& proto) { | |
816 VISIT(set_sync_poll_interval); | 719 VISIT(set_sync_poll_interval); |
817 VISIT(set_sync_long_poll_interval); | 720 VISIT(set_sync_long_poll_interval); |
818 VISIT(max_commit_batch_size); | 721 VISIT(max_commit_batch_size); |
819 VISIT(sessions_commit_delay_seconds); | 722 VISIT(sessions_commit_delay_seconds); |
820 VISIT(throttle_delay_seconds); | 723 VISIT(throttle_delay_seconds); |
821 VISIT(client_invalidation_hint_buffer_size); | 724 VISIT(client_invalidation_hint_buffer_size); |
822 } | 725 } |
823 | 726 |
824 template <class V> | 727 VISIT_PROTO_FIELDS(const sync_pb::ClientToServerResponse::Error& proto) { |
825 void VisitProtoFields(V& visitor, | |
826 const sync_pb::ClientToServerResponse::Error& proto) { | |
827 VISIT_ENUM(error_type); | 728 VISIT_ENUM(error_type); |
828 VISIT(error_description); | 729 VISIT(error_description); |
829 VISIT(url); | 730 VISIT(url); |
830 VISIT_ENUM(action); | 731 VISIT_ENUM(action); |
831 } | 732 } |
832 | 733 |
833 template <class V> | 734 VISIT_PROTO_FIELDS(const sync_pb::ClientToServerResponse& proto) { |
834 void VisitProtoFields(V& visitor, | |
835 const sync_pb::ClientToServerResponse& proto) { | |
836 VISIT(commit); | 735 VISIT(commit); |
837 VISIT(get_updates); | 736 VISIT(get_updates); |
838 VISIT(error); | 737 VISIT(error); |
839 VISIT_ENUM(error_code); | 738 VISIT_ENUM(error_code); |
840 VISIT(error_message); | 739 VISIT(error_message); |
841 VISIT(store_birthday); | 740 VISIT(store_birthday); |
842 VISIT(client_command); | 741 VISIT(client_command); |
843 VISIT_REP(migrated_data_type_id); | 742 VISIT_REP(migrated_data_type_id); |
844 } | 743 } |
845 | 744 |
846 template <class V> | 745 VISIT_PROTO_FIELDS(const sync_pb::ClientToServerMessage& proto) { |
847 void VisitProtoFields(V& visitor, const sync_pb::ClientToServerMessage& proto) { | |
848 VISIT(share); | 746 VISIT(share); |
849 VISIT(protocol_version); | 747 VISIT(protocol_version); |
850 VISIT(commit); | 748 VISIT(commit); |
851 VISIT(get_updates); | 749 VISIT(get_updates); |
852 VISIT(store_birthday); | 750 VISIT(store_birthday); |
853 VISIT(sync_problem_detected); | 751 VISIT(sync_problem_detected); |
854 VISIT(debug_info); | 752 VISIT(debug_info); |
855 VISIT(client_status); | 753 VISIT(client_status); |
856 } | 754 } |
857 | 755 |
858 template <class V> | 756 VISIT_PROTO_FIELDS(const sync_pb::DatatypeAssociationStats& proto) { |
859 void VisitProtoFields(V& visitor, | |
860 const sync_pb::DatatypeAssociationStats& proto) { | |
861 VISIT(data_type_id); | 757 VISIT(data_type_id); |
862 VISIT(num_local_items_before_association); | 758 VISIT(num_local_items_before_association); |
863 VISIT(num_sync_items_before_association); | 759 VISIT(num_sync_items_before_association); |
864 VISIT(num_local_items_after_association); | 760 VISIT(num_local_items_after_association); |
865 VISIT(num_sync_items_after_association); | 761 VISIT(num_sync_items_after_association); |
866 VISIT(num_local_items_added); | 762 VISIT(num_local_items_added); |
867 VISIT(num_local_items_deleted); | 763 VISIT(num_local_items_deleted); |
868 VISIT(num_local_items_modified); | 764 VISIT(num_local_items_modified); |
869 VISIT(num_sync_items_added); | 765 VISIT(num_sync_items_added); |
870 VISIT(num_sync_items_deleted); | 766 VISIT(num_sync_items_deleted); |
871 VISIT(num_sync_items_modified); | 767 VISIT(num_sync_items_modified); |
872 VISIT(local_version_pre_association); | 768 VISIT(local_version_pre_association); |
873 VISIT(sync_version_pre_association); | 769 VISIT(sync_version_pre_association); |
874 VISIT(had_error); | 770 VISIT(had_error); |
875 VISIT(download_wait_time_us); | 771 VISIT(download_wait_time_us); |
876 VISIT(download_time_us); | 772 VISIT(download_time_us); |
877 VISIT(association_wait_time_for_high_priority_us); | 773 VISIT(association_wait_time_for_high_priority_us); |
878 VISIT(association_wait_time_for_same_priority_us); | 774 VISIT(association_wait_time_for_same_priority_us); |
879 } | 775 } |
880 | 776 |
881 template <class V> | 777 VISIT_PROTO_FIELDS(const sync_pb::DebugEventInfo& proto) { |
882 void VisitProtoFields(V& visitor, const sync_pb::DebugEventInfo& proto) { | |
883 VISIT_ENUM(singleton_event); | 778 VISIT_ENUM(singleton_event); |
884 VISIT(sync_cycle_completed_event_info); | 779 VISIT(sync_cycle_completed_event_info); |
885 VISIT(nudging_datatype); | 780 VISIT(nudging_datatype); |
886 VISIT_REP(datatypes_notified_from_server); | 781 VISIT_REP(datatypes_notified_from_server); |
887 VISIT(datatype_association_stats); | 782 VISIT(datatype_association_stats); |
888 } | 783 } |
889 | 784 |
890 template <class V> | 785 VISIT_PROTO_FIELDS(const sync_pb::DebugInfo& proto) { |
891 void VisitProtoFields(V& visitor, const sync_pb::DebugInfo& proto) { | |
892 VISIT_REP(events); | 786 VISIT_REP(events); |
893 VISIT(cryptographer_ready); | 787 VISIT(cryptographer_ready); |
894 VISIT(cryptographer_has_pending_keys); | 788 VISIT(cryptographer_has_pending_keys); |
895 VISIT(events_dropped); | 789 VISIT(events_dropped); |
896 } | 790 } |
897 | 791 |
898 template <class V> | 792 VISIT_PROTO_FIELDS(const sync_pb::SyncCycleCompletedEventInfo& proto) { |
899 void VisitProtoFields(V& visitor, | |
900 const sync_pb::SyncCycleCompletedEventInfo& proto) { | |
901 VISIT(num_encryption_conflicts); | 793 VISIT(num_encryption_conflicts); |
902 VISIT(num_hierarchy_conflicts); | 794 VISIT(num_hierarchy_conflicts); |
903 VISIT(num_server_conflicts); | 795 VISIT(num_server_conflicts); |
904 VISIT(num_updates_downloaded); | 796 VISIT(num_updates_downloaded); |
905 VISIT(num_reflected_updates_downloaded); | 797 VISIT(num_reflected_updates_downloaded); |
906 VISIT(caller_info); | 798 VISIT(caller_info); |
907 } | 799 } |
908 | 800 |
909 template <class V> | 801 VISIT_PROTO_FIELDS(const sync_pb::ClientConfigParams& proto) { |
910 void VisitProtoFields(V& visitor, const sync_pb::ClientConfigParams& proto) { | |
911 VISIT_REP(enabled_type_ids); | 802 VISIT_REP(enabled_type_ids); |
912 VISIT(tabs_datatype_enabled); | 803 VISIT(tabs_datatype_enabled); |
913 VISIT(cookie_jar_mismatch); | 804 VISIT(cookie_jar_mismatch); |
914 } | 805 } |
915 | 806 |
916 template <class V> | 807 VISIT_PROTO_FIELDS(const sync_pb::AttachmentIdProto& proto) { |
917 void VisitProtoFields(V& visitor, const sync_pb::AttachmentIdProto& proto) { | |
918 VISIT(unique_id); | 808 VISIT(unique_id); |
919 } | 809 } |
920 | 810 |
921 template <class V> | 811 VISIT_PROTO_FIELDS(const sync_pb::EntityMetadata& proto) { |
922 void VisitProtoFields(V& visitor, const sync_pb::EntityMetadata& proto) { | |
923 VISIT(client_tag_hash); | 812 VISIT(client_tag_hash); |
924 VISIT(server_id); | 813 VISIT(server_id); |
925 VISIT(is_deleted); | 814 VISIT(is_deleted); |
926 VISIT(sequence_number); | 815 VISIT(sequence_number); |
927 VISIT(acked_sequence_number); | 816 VISIT(acked_sequence_number); |
928 VISIT(server_version); | 817 VISIT(server_version); |
929 VISIT(creation_time); | 818 VISIT(creation_time); |
930 VISIT(modification_time); | 819 VISIT(modification_time); |
931 VISIT(specifics_hash); | 820 VISIT(specifics_hash); |
932 VISIT(base_specifics_hash); | 821 VISIT(base_specifics_hash); |
933 } | 822 } |
934 | 823 |
935 } // namespace syncer | 824 } // namespace syncer |
936 | 825 |
937 #undef VISIT_ | 826 #undef VISIT_ |
938 #undef VISIT_BYTES | 827 #undef VISIT_BYTES |
939 #undef VISIT_ENUM | 828 #undef VISIT_ENUM |
940 #undef VISIT | 829 #undef VISIT |
941 #undef VISIT_REP | 830 #undef VISIT_REP |
942 | 831 |
943 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ | 832 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VISITORS_H_ |
OLD | NEW |