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