Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: components/sync/protocol/proto_visitors.h

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

Powered by Google App Engine
This is Rietveld 408576698