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

Side by Side Diff: ui/latency/ipc/latency_info_param_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/gfx/ipc/geometry/gfx_param_traits.h" 5 #include "ui/gfx/ipc/geometry/gfx_param_traits.h"
6 #include "ui/latency/ipc/latency_info_param_traits_macros.h" 6 #include "ui/latency/ipc/latency_info_param_traits_macros.h"
7 7
8 // Generate param traits size methods. 8 // Generate param traits size methods.
9 #include "ipc/param_traits_size_macros.h" 9 #include "ipc/param_traits_size_macros.h"
10 namespace IPC { 10 namespace IPC {
(...skipping 25 matching lines...) Expand all
36 // Implemetation for ParamTraits<ui::LatencyInfo>. 36 // Implemetation for ParamTraits<ui::LatencyInfo>.
37 #include "ui/latency/ipc/latency_info_param_traits.h" 37 #include "ui/latency/ipc/latency_info_param_traits.h"
38 38
39 namespace IPC { 39 namespace IPC {
40 40
41 void ParamTraits<ui::LatencyInfo>::GetSize(base::PickleSizer* s, 41 void ParamTraits<ui::LatencyInfo>::GetSize(base::PickleSizer* s,
42 const param_type& p) { 42 const param_type& p) {
43 GetParamSize(s, p.trace_name_); 43 GetParamSize(s, p.trace_name_);
44 GetParamSize(s, p.latency_components_); 44 GetParamSize(s, p.latency_components_);
45 GetParamSize(s, p.trace_id_); 45 GetParamSize(s, p.trace_id_);
46 GetParamSize(s, p.began_);
46 GetParamSize(s, p.terminated_); 47 GetParamSize(s, p.terminated_);
47 GetParamSize(s, p.source_event_type_); 48 GetParamSize(s, p.source_event_type_);
48 } 49 }
49 50
50 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) { 51 void ParamTraits<ui::LatencyInfo>::Write(base::Pickle* m, const param_type& p) {
51 WriteParam(m, p.trace_name_); 52 WriteParam(m, p.trace_name_);
52 WriteParam(m, p.latency_components_); 53 WriteParam(m, p.latency_components_);
53 WriteParam(m, p.trace_id_); 54 WriteParam(m, p.trace_id_);
55 WriteParam(m, p.began_);
54 WriteParam(m, p.terminated_); 56 WriteParam(m, p.terminated_);
55 WriteParam(m, p.source_event_type_); 57 WriteParam(m, p.source_event_type_);
56 } 58 }
57 59
58 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m, 60 bool ParamTraits<ui::LatencyInfo>::Read(const base::Pickle* m,
59 base::PickleIterator* iter, 61 base::PickleIterator* iter,
60 param_type* p) { 62 param_type* p) {
61 if (!ReadParam(m, iter, &p->trace_name_)) 63 if (!ReadParam(m, iter, &p->trace_name_))
62 return false; 64 return false;
63 if (!ReadParam(m, iter, &p->latency_components_)) 65 if (!ReadParam(m, iter, &p->latency_components_))
64 return false; 66 return false;
65 67
66 if (!ReadParam(m, iter, &p->trace_id_)) 68 if (!ReadParam(m, iter, &p->trace_id_))
67 return false; 69 return false;
70 if (!ReadParam(m, iter, &p->began_))
71 return false;
68 if (!ReadParam(m, iter, &p->terminated_)) 72 if (!ReadParam(m, iter, &p->terminated_))
69 return false; 73 return false;
70 if (!ReadParam(m, iter, &p->source_event_type_)) 74 if (!ReadParam(m, iter, &p->source_event_type_))
71 return false; 75 return false;
72 76
73 return true; 77 return true;
74 } 78 }
75 79
76 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) { 80 void ParamTraits<ui::LatencyInfo>::Log(const param_type& p, std::string* l) {
77 LogParam(p.trace_name_, l); 81 LogParam(p.trace_name_, l);
78 l->append(" "); 82 l->append(" ");
79 LogParam(p.latency_components_, l); 83 LogParam(p.latency_components_, l);
80 l->append(" "); 84 l->append(" ");
81 LogParam(p.trace_id_, l); 85 LogParam(p.trace_id_, l);
82 l->append(" "); 86 l->append(" ");
87 LogParam(p.began_, l);
88 l->append(" ");
83 LogParam(p.terminated_, l); 89 LogParam(p.terminated_, l);
84 l->append(" "); 90 l->append(" ");
85 LogParam(p.source_event_type_, l); 91 LogParam(p.source_event_type_, l);
86 } 92 }
87 93
88 } // namespace IPC 94 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/input/input_param_traits_unittest.cc ('k') | ui/latency/ipc/latency_info_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698