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

Side by Side Diff: Source/core/timing/ResourceTimingInfo.h

Issue 42363004: [Resource Timing] Memory cached resources should be reported on first use. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix unsigned Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | 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) 2013 Intel Inc. All rights reserved. 2 * Copyright (C) 2013 Intel 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 void setInitialRequest(const ResourceRequest& request) { m_initialRequest = request; } 55 void setInitialRequest(const ResourceRequest& request) { m_initialRequest = request; }
56 const ResourceRequest& initialRequest() const { return m_initialRequest; } 56 const ResourceRequest& initialRequest() const { return m_initialRequest; }
57 57
58 void setFinalResponse(const ResourceResponse& response) { m_finalResponse = response; } 58 void setFinalResponse(const ResourceResponse& response) { m_finalResponse = response; }
59 const ResourceResponse& finalResponse() const { return m_finalResponse; } 59 const ResourceResponse& finalResponse() const { return m_finalResponse; }
60 60
61 void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain .append(redirectResponse); } 61 void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain .append(redirectResponse); }
62 const Vector<ResourceResponse>& redirectChain() const { return m_redirectCha in; } 62 const Vector<ResourceResponse>& redirectChain() const { return m_redirectCha in; }
63 63
64 void clearLoadTimings()
65 {
66 m_finalResponse.setResourceLoadTiming(0);
67 for (size_t i = 0; i < m_redirectChain.size(); ++i)
68 m_redirectChain[i].setResourceLoadTiming(0);
69 }
70
64 private: 71 private:
65 ResourceTimingInfo(const AtomicString& type, const double time) 72 ResourceTimingInfo(const AtomicString& type, const double time)
66 : m_type(type) 73 : m_type(type)
67 , m_initialTime(time) 74 , m_initialTime(time)
68 { 75 {
69 } 76 }
70 77
71 AtomicString m_type; 78 AtomicString m_type;
72 double m_initialTime; 79 double m_initialTime;
73 double m_loadFinishTime; 80 double m_loadFinishTime;
74 ResourceRequest m_initialRequest; 81 ResourceRequest m_initialRequest;
75 ResourceResponse m_finalResponse; 82 ResourceResponse m_finalResponse;
76 Vector<ResourceResponse> m_redirectChain; 83 Vector<ResourceResponse> m_redirectChain;
77 }; 84 };
78 85
79 } // namespace WebCore 86 } // namespace WebCore
80 87
81 #endif 88 #endif
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698