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

Side by Side Diff: ui/latency/mojo/latency_info_struct_traits.cc

Issue 2953073002: LatencyInfo trace_id_ no longer dependent on sequence_number. (Closed)
Patch Set: Address nit. Created 3 years, 5 months 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
« no previous file with comments | « ui/latency/mojo/latency_info_struct_traits.h ('k') | ui/latency/mojo/struct_traits_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/latency/mojo/latency_info_struct_traits.h" 5 #include "ui/latency/mojo/latency_info_struct_traits.h"
6 6
7 #include "ipc/ipc_message_utils.h" 7 #include "ipc/ipc_message_utils.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return info.trace_id(); 284 return info.trace_id();
285 } 285 }
286 286
287 // static 287 // static
288 bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::coalesced( 288 bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::coalesced(
289 const ui::LatencyInfo& info) { 289 const ui::LatencyInfo& info) {
290 return info.coalesced(); 290 return info.coalesced();
291 } 291 }
292 292
293 // static 293 // static
294 bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::began(
295 const ui::LatencyInfo& info) {
296 return info.began();
297 }
298
299 // static
294 bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::terminated( 300 bool StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo>::terminated(
295 const ui::LatencyInfo& info) { 301 const ui::LatencyInfo& info) {
296 return info.terminated(); 302 return info.terminated();
297 } 303 }
298 304
299 // static 305 // static
300 ui::mojom::SourceEventType 306 ui::mojom::SourceEventType
301 StructTraits<ui::mojom::LatencyInfoDataView, 307 StructTraits<ui::mojom::LatencyInfoDataView,
302 ui::LatencyInfo>::source_event_type(const ui::LatencyInfo& info) { 308 ui::LatencyInfo>::source_event_type(const ui::LatencyInfo& info) {
303 return UISourceEventTypeToMojo(info.source_event_type()); 309 return UISourceEventTypeToMojo(info.source_event_type());
(...skipping 14 matching lines...) Expand all
318 ui::LatencyInfo::LatencyMap::key_type key; 324 ui::LatencyInfo::LatencyMap::key_type key;
319 if (!component_pair.ReadKey(&key)) 325 if (!component_pair.ReadKey(&key))
320 return false; 326 return false;
321 auto& value = out->latency_components_[key]; 327 auto& value = out->latency_components_[key];
322 if (!component_pair.ReadValue(&value)) 328 if (!component_pair.ReadValue(&value))
323 return false; 329 return false;
324 } 330 }
325 331
326 out->trace_id_ = data.trace_id(); 332 out->trace_id_ = data.trace_id();
327 out->coalesced_ = data.coalesced(); 333 out->coalesced_ = data.coalesced();
334 out->began_ = data.began();
328 out->terminated_ = data.terminated(); 335 out->terminated_ = data.terminated();
329 out->source_event_type_ = MojoSourceEventTypeToUI(data.source_event_type()); 336 out->source_event_type_ = MojoSourceEventTypeToUI(data.source_event_type());
330 return true; 337 return true;
331 } 338 }
332 339
333 } // namespace mojo 340 } // namespace mojo
OLDNEW
« no previous file with comments | « ui/latency/mojo/latency_info_struct_traits.h ('k') | ui/latency/mojo/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698