Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 | 60 |
| 61 void setFinalResponse(const ResourceResponse& response) { m_finalResponse = response; } | 61 void setFinalResponse(const ResourceResponse& response) { m_finalResponse = response; } |
| 62 const ResourceResponse& finalResponse() const { return m_finalResponse; } | 62 const ResourceResponse& finalResponse() const { return m_finalResponse; } |
| 63 | 63 |
| 64 void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain .append(redirectResponse); } | 64 void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain .append(redirectResponse); } |
| 65 const Vector<ResourceResponse>& redirectChain() const { return m_redirectCha in; } | 65 const Vector<ResourceResponse>& redirectChain() const { return m_redirectCha in; } |
| 66 | 66 |
| 67 void clearLoadTimings() | 67 void clearLoadTimings() |
| 68 { | 68 { |
| 69 m_finalResponse.setResourceLoadTiming(nullptr); | 69 m_finalResponse.setResourceLoadTiming(nullptr); |
| 70 for (size_t i = 0; i < m_redirectChain.size(); ++i) | 70 for (auto& redirect : m_redirectChain) |
|
Mike West
2014/10/21 19:29:42
Nit: Don't use `auto` here. Using ResourceResponse
| |
| 71 m_redirectChain[i].setResourceLoadTiming(nullptr); | 71 redirect.setResourceLoadTiming(nullptr); |
| 72 } | 72 } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 ResourceTimingInfo(const AtomicString& type, const double time) | 75 ResourceTimingInfo(const AtomicString& type, const double time) |
| 76 : m_type(type) | 76 : m_type(type) |
| 77 , m_initialTime(time) | 77 , m_initialTime(time) |
| 78 { | 78 { |
| 79 } | 79 } |
| 80 | 80 |
| 81 AtomicString m_type; | 81 AtomicString m_type; |
| 82 AtomicString m_originalTimingAllowOrigin; | 82 AtomicString m_originalTimingAllowOrigin; |
| 83 double m_initialTime; | 83 double m_initialTime; |
| 84 double m_loadFinishTime; | 84 double m_loadFinishTime; |
| 85 ResourceRequest m_initialRequest; | 85 ResourceRequest m_initialRequest; |
| 86 ResourceResponse m_finalResponse; | 86 ResourceResponse m_finalResponse; |
| 87 Vector<ResourceResponse> m_redirectChain; | 87 Vector<ResourceResponse> m_redirectChain; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| 91 | 91 |
| 92 #endif | 92 #endif |
| OLD | NEW |