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

Side by Side Diff: Source/core/page/PerformanceResourceTiming.h

Issue 16950017: Reland [Resource Timing] Expose redirect timing information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 5 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 | « Source/core/page/Performance.cpp ('k') | Source/core/page/PerformanceResourceTiming.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 25 matching lines...) Expand all
36 #include "wtf/PassRefPtr.h" 36 #include "wtf/PassRefPtr.h"
37 #include "wtf/RefPtr.h" 37 #include "wtf/RefPtr.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 class Document; 41 class Document;
42 class KURL; 42 class KURL;
43 class ResourceLoadTiming; 43 class ResourceLoadTiming;
44 class ResourceRequest; 44 class ResourceRequest;
45 class ResourceResponse; 45 class ResourceResponse;
46 class ResourceTimingInfo;
46 47
47 class PerformanceResourceTiming : public PerformanceEntry { 48 class PerformanceResourceTiming : public PerformanceEntry {
48 public: 49 public:
49 static PassRefPtr<PerformanceResourceTiming> create(const AtomicString& init iatorType, const ResourceRequest& request, const ResourceResponse& response, dou ble initiationTime, double finishTime, Document* requestingDocument) 50 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo & info, Document* requestingDocument, double startTime, double lastRedirectEndTi me, bool m_allowTimingDetails, bool m_allowRedirectDetails)
50 { 51 {
51 return adoptRef(new PerformanceResourceTiming(initiatorType, request, re sponse, initiationTime, finishTime, requestingDocument)); 52 return adoptRef(new PerformanceResourceTiming(info, requestingDocument, startTime, lastRedirectEndTime, m_allowTimingDetails, m_allowRedirectDetails));
53 }
54
55 static PassRefPtr<PerformanceResourceTiming> create(const ResourceTimingInfo & info, Document* requestingDocument, double startTime, bool m_allowTimingDetail s)
56 {
57 return adoptRef(new PerformanceResourceTiming(info, requestingDocument, startTime, 0.0, m_allowTimingDetails, false));
52 } 58 }
53 59
54 AtomicString initiatorType() const; 60 AtomicString initiatorType() const;
55 61
56 double redirectStart() const; 62 double redirectStart() const;
57 double redirectEnd() const; 63 double redirectEnd() const;
58 double fetchStart() const; 64 double fetchStart() const;
59 double domainLookupStart() const; 65 double domainLookupStart() const;
60 double domainLookupEnd() const; 66 double domainLookupEnd() const;
61 double connectStart() const; 67 double connectStart() const;
62 double connectEnd() const; 68 double connectEnd() const;
63 double secureConnectionStart() const; 69 double secureConnectionStart() const;
64 double requestStart() const; 70 double requestStart() const;
65 double responseStart() const; 71 double responseStart() const;
66 double responseEnd() const; 72 double responseEnd() const;
67 73
68 virtual bool isResource() { return true; } 74 virtual bool isResource() { return true; }
69 75
70 private: 76 private:
71 PerformanceResourceTiming(const AtomicString& initatorType, const ResourceRe quest&, const ResourceResponse&, double initiationTime, double finishTime, Docum ent*); 77 PerformanceResourceTiming(const ResourceTimingInfo&, Document* requestingDoc ument, double startTime, double lastRedirectEndTime, bool m_allowTimingDetails, bool m_allowRedirectDetails);
72 ~PerformanceResourceTiming(); 78 ~PerformanceResourceTiming();
73 79
74 AtomicString m_initiatorType; 80 AtomicString m_initiatorType;
75 RefPtr<ResourceLoadTiming> m_timing; 81 RefPtr<ResourceLoadTiming> m_timing;
82 double m_lastRedirectEndTime;
76 double m_finishTime; 83 double m_finishTime;
77 bool m_didReuseConnection; 84 bool m_didReuseConnection;
78 bool m_shouldReportDetails; 85 bool m_allowTimingDetails;
86 bool m_allowRedirectDetails;
79 RefPtr<Document> m_requestingDocument; 87 RefPtr<Document> m_requestingDocument;
80 }; 88 };
81 89
82 } 90 }
83 91
84 #endif // !defined(PerformanceResourceTiming_h) 92 #endif // !defined(PerformanceResourceTiming_h)
OLDNEW
« no previous file with comments | « Source/core/page/Performance.cpp ('k') | Source/core/page/PerformanceResourceTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698