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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2615533002: Remove duplicate domHighResTimestamp conversion in NavigationTiming (Closed)
Patch Set: fixed layout test failures Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/core/timing/PerformanceBase.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const AtomicString& interfaceName() const override; 67 const AtomicString& interfaceName() const override;
68 68
69 virtual PerformanceTiming* timing() const; 69 virtual PerformanceTiming* timing() const;
70 70
71 virtual void updateLongTaskInstrumentation() {} 71 virtual void updateLongTaskInstrumentation() {}
72 72
73 // Reduce the resolution to 5µs to prevent timing attacks. See: 73 // Reduce the resolution to 5µs to prevent timing attacks. See:
74 // http://www.w3.org/TR/hr-time-2/#privacy-security 74 // http://www.w3.org/TR/hr-time-2/#privacy-security
75 static double clampTimeResolution(double timeSeconds); 75 static double clampTimeResolution(double timeSeconds);
76 76
77 static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(
78 double timeOrigin,
79 double monotonicTime);
80
77 // Translate given platform monotonic time in seconds into a high resolution 81 // Translate given platform monotonic time in seconds into a high resolution
78 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to 82 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to
79 // document's time origin and has a time resolution that is safe for 83 // document's time origin and has a time resolution that is safe for
80 // exposing to web. 84 // exposing to web.
81 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const; 85 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const;
82 DOMHighResTimeStamp now() const; 86 DOMHighResTimeStamp now() const;
83 87
84 double timeOrigin() const { return m_timeOrigin; } 88 double timeOrigin() const { return m_timeOrigin; }
85 89
86 PerformanceEntryVector getEntries() const; 90 PerformanceEntryVector getEntries() const;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 PerformanceEntryTypeMask m_observerFilterOptions; 172 PerformanceEntryTypeMask m_observerFilterOptions;
169 PerformanceObservers m_observers; 173 PerformanceObservers m_observers;
170 PerformanceObservers m_activeObservers; 174 PerformanceObservers m_activeObservers;
171 PerformanceObservers m_suspendedObservers; 175 PerformanceObservers m_suspendedObservers;
172 Timer<PerformanceBase> m_deliverObservationsTimer; 176 Timer<PerformanceBase> m_deliverObservationsTimer;
173 }; 177 };
174 178
175 } // namespace blink 179 } // namespace blink
176 180
177 #endif // PerformanceBase_h 181 #endif // PerformanceBase_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/timing/PerformanceBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698