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

Side by Side Diff: content/public/common/webkit_param_traits.cc

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync & Merge Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // NOTE: New trait definitions that will be used by Chrome Frame must be placed 5 // NOTE: New trait definitions that will be used by Chrome Frame must be placed
6 // in common_param_traits2.cc. 6 // in common_param_traits2.cc.
7 7
8 #include "content/public/common/webkit_param_traits.h" 8 #include "content/public/common/webkit_param_traits.h"
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 22 matching lines...) Expand all
33 NPVariant_Param::~NPVariant_Param() { 33 NPVariant_Param::~NPVariant_Param() {
34 } 34 }
35 35
36 namespace IPC { 36 namespace IPC {
37 37
38 void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Write( 38 void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Write(
39 Message* m, const param_type& p) { 39 Message* m, const param_type& p) {
40 WriteParam(m, p.base_time.is_null()); 40 WriteParam(m, p.base_time.is_null());
41 if (p.base_time.is_null()) 41 if (p.base_time.is_null())
42 return; 42 return;
43 WriteParam(m, p.base_ticks);
43 WriteParam(m, p.base_time); 44 WriteParam(m, p.base_time);
44 WriteParam(m, p.proxy_start); 45 WriteParam(m, p.proxy_start);
45 WriteParam(m, p.proxy_end); 46 WriteParam(m, p.proxy_end);
46 WriteParam(m, p.dns_start); 47 WriteParam(m, p.dns_start);
47 WriteParam(m, p.dns_end); 48 WriteParam(m, p.dns_end);
48 WriteParam(m, p.connect_start); 49 WriteParam(m, p.connect_start);
49 WriteParam(m, p.connect_end); 50 WriteParam(m, p.connect_end);
50 WriteParam(m, p.ssl_start); 51 WriteParam(m, p.ssl_start);
51 WriteParam(m, p.ssl_end); 52 WriteParam(m, p.ssl_end);
52 WriteParam(m, p.send_start); 53 WriteParam(m, p.send_start);
53 WriteParam(m, p.send_end); 54 WriteParam(m, p.send_end);
54 WriteParam(m, p.receive_headers_start); 55 WriteParam(m, p.receive_headers_start);
55 WriteParam(m, p.receive_headers_end); 56 WriteParam(m, p.receive_headers_end);
56 } 57 }
57 58
58 bool ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Read( 59 bool ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Read(
59 const Message* m, void** iter, param_type* r) { 60 const Message* m, void** iter, param_type* r) {
60 bool is_null; 61 bool is_null;
61 if (!ReadParam(m, iter, &is_null)) 62 if (!ReadParam(m, iter, &is_null))
62 return false; 63 return false;
63 if (is_null) 64 if (is_null)
64 return true; 65 return true;
65 66
66 return 67 return
68 ReadParam(m, iter, &r->base_ticks) &&
67 ReadParam(m, iter, &r->base_time) && 69 ReadParam(m, iter, &r->base_time) &&
68 ReadParam(m, iter, &r->proxy_start) && 70 ReadParam(m, iter, &r->proxy_start) &&
69 ReadParam(m, iter, &r->proxy_end) && 71 ReadParam(m, iter, &r->proxy_end) &&
70 ReadParam(m, iter, &r->dns_start) && 72 ReadParam(m, iter, &r->dns_start) &&
71 ReadParam(m, iter, &r->dns_end) && 73 ReadParam(m, iter, &r->dns_end) &&
72 ReadParam(m, iter, &r->connect_start) && 74 ReadParam(m, iter, &r->connect_start) &&
73 ReadParam(m, iter, &r->connect_end) && 75 ReadParam(m, iter, &r->connect_end) &&
74 ReadParam(m, iter, &r->ssl_start) && 76 ReadParam(m, iter, &r->ssl_start) &&
75 ReadParam(m, iter, &r->ssl_end) && 77 ReadParam(m, iter, &r->ssl_end) &&
76 ReadParam(m, iter, &r->send_start) && 78 ReadParam(m, iter, &r->send_start) &&
77 ReadParam(m, iter, &r->send_end) && 79 ReadParam(m, iter, &r->send_end) &&
78 ReadParam(m, iter, &r->receive_headers_start) && 80 ReadParam(m, iter, &r->receive_headers_start) &&
79 ReadParam(m, iter, &r->receive_headers_end); 81 ReadParam(m, iter, &r->receive_headers_end);
80 } 82 }
81 83
82 void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Log(const param_type& p, 84 void ParamTraits<webkit_glue::ResourceLoadTimingInfo>::Log(const param_type& p,
83 std::string* l) { 85 std::string* l) {
84 l->append("("); 86 l->append("(");
87 LogParam(p.base_ticks, l);
88 l->append(", ");
85 LogParam(p.base_time, l); 89 LogParam(p.base_time, l);
86 l->append(", "); 90 l->append(", ");
87 LogParam(p.proxy_start, l); 91 LogParam(p.proxy_start, l);
88 l->append(", "); 92 l->append(", ");
89 LogParam(p.proxy_end, l); 93 LogParam(p.proxy_end, l);
90 l->append(", "); 94 l->append(", ");
91 LogParam(p.dns_start, l); 95 LogParam(p.dns_start, l);
92 l->append(", "); 96 l->append(", ");
93 LogParam(p.dns_end, l); 97 LogParam(p.dns_end, l);
94 l->append(", "); 98 l->append(", ");
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ReadParam(m, iter, &p->ssl_valid) && 343 ReadParam(m, iter, &p->ssl_valid) &&
340 ReadParam(m, iter, &p->preferred) && 344 ReadParam(m, iter, &p->preferred) &&
341 ReadParam(m, iter, &p->blacklisted_by_user); 345 ReadParam(m, iter, &p->blacklisted_by_user);
342 } 346 }
343 void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p, 347 void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
344 std::string* l) { 348 std::string* l) {
345 l->append("<PasswordForm>"); 349 l->append("<PasswordForm>");
346 } 350 }
347 351
348 } // namespace IPC 352 } // namespace IPC
OLDNEW
« no previous file with comments | « content/public/common/resource_response.h ('k') | content/test/render_view_fake_resources_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698