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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp

Issue 2620463002: Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: fix crash Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const String& sourceCode, 42 const String& sourceCode,
43 std::unique_ptr<Vector<char>> cachedMetaData, 43 std::unique_ptr<Vector<char>> cachedMetaData,
44 WorkerThreadStartMode startMode, 44 WorkerThreadStartMode startMode,
45 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, 45 const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders,
46 const String& referrerPolicy, 46 const String& referrerPolicy,
47 const SecurityOrigin* starterOrigin, 47 const SecurityOrigin* starterOrigin,
48 WorkerClients* workerClients, 48 WorkerClients* workerClients,
49 WebAddressSpace addressSpace, 49 WebAddressSpace addressSpace,
50 const Vector<String>* originTrialTokens, 50 const Vector<String>* originTrialTokens,
51 std::unique_ptr<WorkerSettings> workerSettings, 51 std::unique_ptr<WorkerSettings> workerSettings,
52 WorkerV8Settings workerV8Settings) 52 WorkerV8Settings workerV8Settings,
53 bool inspectorNetworkCapability)
53 : m_scriptURL(scriptURL.copy()), 54 : m_scriptURL(scriptURL.copy()),
54 m_userAgent(userAgent.isolatedCopy()), 55 m_userAgent(userAgent.isolatedCopy()),
55 m_sourceCode(sourceCode.isolatedCopy()), 56 m_sourceCode(sourceCode.isolatedCopy()),
56 m_cachedMetaData(std::move(cachedMetaData)), 57 m_cachedMetaData(std::move(cachedMetaData)),
57 m_startMode(startMode), 58 m_startMode(startMode),
58 m_referrerPolicy(referrerPolicy.isolatedCopy()), 59 m_referrerPolicy(referrerPolicy.isolatedCopy()),
59 m_starterOriginPrivilegeData( 60 m_starterOriginPrivilegeData(
60 starterOrigin ? starterOrigin->createPrivilegeData() : nullptr), 61 starterOrigin ? starterOrigin->createPrivilegeData() : nullptr),
61 m_workerClients(workerClients), 62 m_workerClients(workerClients),
62 m_addressSpace(addressSpace), 63 m_addressSpace(addressSpace),
63 m_workerSettings(std::move(workerSettings)), 64 m_workerSettings(std::move(workerSettings)),
64 m_workerV8Settings(workerV8Settings) { 65 m_workerV8Settings(workerV8Settings),
66 m_inspectorNetworkCapability(inspectorNetworkCapability) {
65 m_contentSecurityPolicyHeaders = WTF::makeUnique<Vector<CSPHeaderAndType>>(); 67 m_contentSecurityPolicyHeaders = WTF::makeUnique<Vector<CSPHeaderAndType>>();
66 if (contentSecurityPolicyHeaders) { 68 if (contentSecurityPolicyHeaders) {
67 for (const auto& header : *contentSecurityPolicyHeaders) { 69 for (const auto& header : *contentSecurityPolicyHeaders) {
68 CSPHeaderAndType copiedHeader(header.first.isolatedCopy(), header.second); 70 CSPHeaderAndType copiedHeader(header.first.isolatedCopy(), header.second);
69 m_contentSecurityPolicyHeaders->push_back(copiedHeader); 71 m_contentSecurityPolicyHeaders->push_back(copiedHeader);
70 } 72 }
71 } 73 }
72 74
73 m_originTrialTokens = std::unique_ptr<Vector<String>>(new Vector<String>()); 75 m_originTrialTokens = std::unique_ptr<Vector<String>>(new Vector<String>());
74 if (originTrialTokens) { 76 if (originTrialTokens) {
75 for (const String& token : *originTrialTokens) 77 for (const String& token : *originTrialTokens)
76 m_originTrialTokens->push_back(token.isolatedCopy()); 78 m_originTrialTokens->push_back(token.isolatedCopy());
77 } 79 }
78 } 80 }
79 81
80 WorkerThreadStartupData::~WorkerThreadStartupData() {} 82 WorkerThreadStartupData::~WorkerThreadStartupData() {}
81 83
82 } // namespace blink 84 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698