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

Side by Side Diff: Source/platform/network/ResourceTimingInfo.cpp

Issue 1184403003: Offer Resource Timing in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: inline CrossThreadCopierBase::copy() Created 5 years, 6 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/platform/network/ResourceTimingInfo.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "platform/network/ResourceTimingInfo.h"
7
8 #include "platform/CrossThreadCopier.h"
9
10 namespace blink {
11
12 PassOwnPtr<ResourceTimingInfo> ResourceTimingInfo::adopt(PassOwnPtr<CrossThreadR esourceTimingInfoData> data)
13 {
14 OwnPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(AtomicString(da ta->m_type), data->m_initialTime, data->m_isMainResource);
15 info->m_originalTimingAllowOrigin = AtomicString(data->m_originalTimingAllow Origin);
16 info->m_loadFinishTime = data->m_loadFinishTime;
17 info->m_initialRequest = *ResourceRequest::adopt(data->m_initialRequest.rele ase());
18 info->m_finalResponse = *ResourceResponse::adopt(data->m_finalResponse.relea se());
19 for (auto& responseData : data->m_redirectChain)
20 info->m_redirectChain.append(*ResourceResponse::adopt(responseData.relea se()));
21 return info.release();
22 }
23
24 PassOwnPtr<CrossThreadResourceTimingInfoData> ResourceTimingInfo::copyData() con st
25 {
26 OwnPtr<CrossThreadResourceTimingInfoData> data = adoptPtr(new CrossThreadRe sourceTimingInfoData);
tkent 2015/06/24 03:04:59 Remove one space after '='
Kunihiko Sakamoto 2015/06/24 04:10:34 Done.
27 data->m_type = m_type.string().isolatedCopy();
28 data->m_originalTimingAllowOrigin = m_originalTimingAllowOrigin.string().iso latedCopy();
29 data->m_initialTime = m_initialTime;
30 data->m_loadFinishTime = m_loadFinishTime;
31 data->m_initialRequest = m_initialRequest.copyData();
32 data->m_finalResponse = m_finalResponse.copyData();
33 for (const auto& response : m_redirectChain)
34 data->m_redirectChain.append(response.copyData());
35 data->m_isMainResource = m_isMainResource;
36 return data.release();
37 }
38
39 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/network/ResourceTimingInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698