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

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

Issue 2655123002: Revert of Added DCHECK for monotonicTimeToDOMHighResTimeStamp in PerformanceBase (Closed)
Patch Set: sync Created 3 years, 10 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 * 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const AtomicString& interfaceName() const override; 68 const AtomicString& interfaceName() const override;
69 69
70 virtual PerformanceTiming* timing() const; 70 virtual PerformanceTiming* timing() const;
71 71
72 virtual void updateLongTaskInstrumentation() {} 72 virtual void updateLongTaskInstrumentation() {}
73 73
74 // Reduce the resolution to 5µs to prevent timing attacks. See: 74 // Reduce the resolution to 5µs to prevent timing attacks. See:
75 // http://www.w3.org/TR/hr-time-2/#privacy-security 75 // http://www.w3.org/TR/hr-time-2/#privacy-security
76 static double clampTimeResolution(double timeSeconds); 76 static double clampTimeResolution(double timeSeconds);
77 77
78 // monotonicTime needs to be no smaller than timeOrigin.
79 static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp( 78 static DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(
80 double timeOrigin, 79 double timeOrigin,
81 double monotonicTime); 80 double monotonicTime);
82 81
83 // Translate given platform monotonic time in seconds into a high resolution 82 // Translate given platform monotonic time in seconds into a high resolution
84 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to 83 // DOMHighResTimeStamp in milliseconds. The result timestamp is relative to
85 // document's time origin and has a time resolution that is safe for 84 // document's time origin and has a time resolution that is safe for
86 // exposing to web. The monotonic time provided needs to be no smaller than 85 // exposing to web.
87 // document's time origin.
88 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const; 86 DOMHighResTimeStamp monotonicTimeToDOMHighResTimeStamp(double) const;
89 DOMHighResTimeStamp now() const; 87 DOMHighResTimeStamp now() const;
90 88
91 double timeOrigin() const { return m_timeOrigin; } 89 double timeOrigin() const { return m_timeOrigin; }
92 90
93 PerformanceEntryVector getEntries() const; 91 PerformanceEntryVector getEntries() const;
94 PerformanceEntryVector getEntriesByType(const String& entryType); 92 PerformanceEntryVector getEntriesByType(const String& entryType);
95 PerformanceEntryVector getEntriesByName(const String& name, 93 PerformanceEntryVector getEntriesByName(const String& name,
96 const String& entryType); 94 const String& entryType);
97 95
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 PerformanceEntryTypeMask m_observerFilterOptions; 178 PerformanceEntryTypeMask m_observerFilterOptions;
181 PerformanceObservers m_observers; 179 PerformanceObservers m_observers;
182 PerformanceObservers m_activeObservers; 180 PerformanceObservers m_activeObservers;
183 PerformanceObservers m_suspendedObservers; 181 PerformanceObservers m_suspendedObservers;
184 TaskRunnerTimer<PerformanceBase> m_deliverObservationsTimer; 182 TaskRunnerTimer<PerformanceBase> m_deliverObservationsTimer;
185 }; 183 };
186 184
187 } // namespace blink 185 } // namespace blink
188 186
189 #endif // PerformanceBase_h 187 #endif // PerformanceBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698