OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/network/ResourceTimingInfo.h" | 5 #include "platform/network/ResourceTimingInfo.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "platform/CrossThreadCopier.h" | 8 #include "platform/CrossThreadCopier.h" |
8 #include "wtf/PtrUtil.h" | 9 #include "wtf/PtrUtil.h" |
9 #include <memory> | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 std::unique_ptr<ResourceTimingInfo> ResourceTimingInfo::adopt( | 13 std::unique_ptr<ResourceTimingInfo> ResourceTimingInfo::adopt( |
14 std::unique_ptr<CrossThreadResourceTimingInfoData> data) { | 14 std::unique_ptr<CrossThreadResourceTimingInfoData> data) { |
15 std::unique_ptr<ResourceTimingInfo> info = ResourceTimingInfo::create( | 15 std::unique_ptr<ResourceTimingInfo> info = ResourceTimingInfo::create( |
16 AtomicString(data->m_type), data->m_initialTime, data->m_isMainResource); | 16 AtomicString(data->m_type), data->m_initialTime, data->m_isMainResource); |
17 info->m_originalTimingAllowOrigin = | 17 info->m_originalTimingAllowOrigin = |
18 AtomicString(data->m_originalTimingAllowOrigin); | 18 AtomicString(data->m_originalTimingAllowOrigin); |
19 info->m_loadFinishTime = data->m_loadFinishTime; | 19 info->m_loadFinishTime = data->m_loadFinishTime; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 if (crossOrigin) { | 51 if (crossOrigin) { |
52 m_hasCrossOriginRedirect = true; | 52 m_hasCrossOriginRedirect = true; |
53 m_transferSize = 0; | 53 m_transferSize = 0; |
54 } else { | 54 } else { |
55 DCHECK_GE(redirectResponse.encodedDataLength(), 0); | 55 DCHECK_GE(redirectResponse.encodedDataLength(), 0); |
56 m_transferSize += redirectResponse.encodedDataLength(); | 56 m_transferSize += redirectResponse.encodedDataLength(); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 } // namespace blink | 60 } // namespace blink |
OLD | NEW |