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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceTimingInfo.h

Issue 2647643004: Report nav timing 2 instance as soon as it's requested. (Closed)
Patch Set: make ResourceTimingInfo ref-counted 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h b/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
index dbb603e4bd3950b3b4bef84b6872ae02271584fb..fc9b8d121506d582ccb960a9eb646d41f21adc03 100644
--- a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
+++ b/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
@@ -45,17 +45,18 @@ namespace blink {
struct CrossThreadResourceTimingInfoData;
-class PLATFORM_EXPORT ResourceTimingInfo {
+class PLATFORM_EXPORT ResourceTimingInfo
+ : public RefCounted<ResourceTimingInfo> {
USING_FAST_MALLOC(ResourceTimingInfo);
WTF_MAKE_NONCOPYABLE(ResourceTimingInfo);
public:
- static std::unique_ptr<ResourceTimingInfo> create(const AtomicString& type,
- const double time,
- bool isMainResource) {
- return WTF::wrapUnique(new ResourceTimingInfo(type, time, isMainResource));
+ static PassRefPtr<ResourceTimingInfo> create(const AtomicString& type,
+ const double time,
+ bool isMainResource) {
+ return adoptRef(new ResourceTimingInfo(type, time, isMainResource));
}
- static std::unique_ptr<ResourceTimingInfo> adopt(
+ static PassRefPtr<ResourceTimingInfo> adopt(
std::unique_ptr<CrossThreadResourceTimingInfoData>);
// Gets a copy of the data suitable for passing to another thread.

Powered by Google App Engine
This is Rietveld 408576698