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

Side by Side Diff: Source/core/platform/network/ResourceLoadTiming.h

Issue 15265004: Fix ResourceLoadTiming resolution lose issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 bool operator!=(const ResourceLoadTiming& other) const 78 bool operator!=(const ResourceLoadTiming& other) const
79 { 79 {
80 return !(*this == other); 80 return !(*this == other);
81 } 81 }
82 82
83 // We want to present a unified timeline to Javascript. Using walltime is pr oblematic, because the clock may skew while resources 83 // We want to present a unified timeline to Javascript. Using walltime is pr oblematic, because the clock may skew while resources
84 // load. To prevent that skew, we record a single reference walltime when ro ot document navigation begins. All other times are 84 // load. To prevent that skew, we record a single reference walltime when ro ot document navigation begins. All other times are
85 // recorded using monotonicallyIncreasingTime(). When a time needs to be pre sented to Javascript, we build a pseudo-walltime 85 // recorded using monotonicallyIncreasingTime(). When a time needs to be pre sented to Javascript, we build a pseudo-walltime
86 // using the following equation: 86 // using the following equation (requestTime as example):
87 // pseudo time = document wall reference + (resource request time - docume nt monotonic reference) + deltaMilliseconds / 1000.0. 87 // pseudo time = document wall reference + (requestTime - document monoton ic reference).
88 double convertResourceLoadTimeToMonotonicTime(int deltaMilliseconds) const; 88 double requestTime; // All monotonicallyIncreasingTime() in seconds
89 89 double proxyStart;
90 double requestTime; // monotonicallyIncreasingTime() when the port started h andling this request. 90 double proxyEnd;
91 int proxyStart; // The rest of these are millisecond deltas, using monotonic allyIncreasingTime(), from requestTime. 91 double dnsStart;
92 int proxyEnd; 92 double dnsEnd;
93 int dnsStart; 93 double connectStart;
94 int dnsEnd; 94 double connectEnd;
95 int connectStart; 95 double sendStart;
96 int connectEnd; 96 double sendEnd;
97 int sendStart; 97 double receiveHeadersEnd;
98 int sendEnd; 98 double sslStart;
99 int receiveHeadersEnd; 99 double sslEnd;
100 int sslStart;
101 int sslEnd;
102 100
103 private: 101 private:
104 ResourceLoadTiming() 102 ResourceLoadTiming()
105 : requestTime(0) 103 : requestTime(0)
106 , proxyStart(-1) 104 , proxyStart(0)
107 , proxyEnd(-1) 105 , proxyEnd(0)
108 , dnsStart(-1) 106 , dnsStart(0)
109 , dnsEnd(-1) 107 , dnsEnd(0)
110 , connectStart(-1) 108 , connectStart(0)
111 , connectEnd(-1) 109 , connectEnd(0)
112 , sendStart(0) 110 , sendStart(0)
113 , sendEnd(0) 111 , sendEnd(0)
114 , receiveHeadersEnd(0) 112 , receiveHeadersEnd(0)
115 , sslStart(-1) 113 , sslStart(0)
116 , sslEnd(-1) 114 , sslEnd(0)
117 { 115 {
118 } 116 }
119 }; 117 };
120 118
121 } 119 }
122 120
123 #endif 121 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698